diff options
| -rw-r--r-- | fs/xfs/xfs_super.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/fs/xfs/xfs_super.c b/fs/xfs/xfs_super.c index f2e5f8a503d2..986c5577c4e9 100644 --- a/fs/xfs/xfs_super.c +++ b/fs/xfs/xfs_super.c | |||
| @@ -61,6 +61,7 @@ | |||
| 61 | static const struct super_operations xfs_super_operations; | 61 | static const struct super_operations xfs_super_operations; |
| 62 | static kmem_zone_t *xfs_ioend_zone; | 62 | static kmem_zone_t *xfs_ioend_zone; |
| 63 | mempool_t *xfs_ioend_pool; | 63 | mempool_t *xfs_ioend_pool; |
| 64 | struct kset *xfs_kset; | ||
| 64 | 65 | ||
| 65 | #define MNTOPT_LOGBUFS "logbufs" /* number of XFS log buffers */ | 66 | #define MNTOPT_LOGBUFS "logbufs" /* number of XFS log buffers */ |
| 66 | #define MNTOPT_LOGBSIZE "logbsize" /* size of XFS log buffers */ | 67 | #define MNTOPT_LOGBSIZE "logbsize" /* size of XFS log buffers */ |
| @@ -1761,9 +1762,15 @@ init_xfs_fs(void) | |||
| 1761 | if (error) | 1762 | if (error) |
| 1762 | goto out_cleanup_procfs; | 1763 | goto out_cleanup_procfs; |
| 1763 | 1764 | ||
| 1765 | xfs_kset = kset_create_and_add("xfs", NULL, fs_kobj); | ||
| 1766 | if (!xfs_kset) { | ||
| 1767 | error = -ENOMEM; | ||
| 1768 | goto out_sysctl_unregister;; | ||
| 1769 | } | ||
| 1770 | |||
| 1764 | error = xfs_qm_init(); | 1771 | error = xfs_qm_init(); |
| 1765 | if (error) | 1772 | if (error) |
| 1766 | goto out_sysctl_unregister; | 1773 | goto out_kset_unregister; |
| 1767 | 1774 | ||
| 1768 | error = register_filesystem(&xfs_fs_type); | 1775 | error = register_filesystem(&xfs_fs_type); |
| 1769 | if (error) | 1776 | if (error) |
| @@ -1772,6 +1779,8 @@ init_xfs_fs(void) | |||
| 1772 | 1779 | ||
| 1773 | out_qm_exit: | 1780 | out_qm_exit: |
| 1774 | xfs_qm_exit(); | 1781 | xfs_qm_exit(); |
| 1782 | out_kset_unregister: | ||
| 1783 | kset_unregister(xfs_kset); | ||
| 1775 | out_sysctl_unregister: | 1784 | out_sysctl_unregister: |
| 1776 | xfs_sysctl_unregister(); | 1785 | xfs_sysctl_unregister(); |
| 1777 | out_cleanup_procfs: | 1786 | out_cleanup_procfs: |
| @@ -1793,6 +1802,7 @@ exit_xfs_fs(void) | |||
| 1793 | { | 1802 | { |
| 1794 | xfs_qm_exit(); | 1803 | xfs_qm_exit(); |
| 1795 | unregister_filesystem(&xfs_fs_type); | 1804 | unregister_filesystem(&xfs_fs_type); |
| 1805 | kset_unregister(xfs_kset); | ||
| 1796 | xfs_sysctl_unregister(); | 1806 | xfs_sysctl_unregister(); |
| 1797 | xfs_cleanup_procfs(); | 1807 | xfs_cleanup_procfs(); |
| 1798 | xfs_buf_terminate(); | 1808 | xfs_buf_terminate(); |
