Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

xfs: xfs_kset should be static

As it is accessed through the struct xfs_mount and can be set up
entirely from fs/xfs/xfs_super.c

Signed-off-by: Dave Chinner <dchinner@redhat.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Dave Chinner <david@fromorbit.com>

authored by

Dave Chinner and committed by
Dave Chinner
e3aed1a0 bf1ed383

+2 -4
-3
fs/xfs/xfs_mount.c
··· 61 61 static int xfs_uuid_table_size; 62 62 static uuid_t *xfs_uuid_table; 63 63 64 - extern struct kset *xfs_kset; 65 - 66 64 /* 67 65 * See if the UUID is unique among mounted XFS filesystems. 68 66 * Mount fails if UUID is nil or a FS with the same UUID is already mounted. ··· 727 729 728 730 xfs_set_maxicount(mp); 729 731 730 - mp->m_kobj.kobject.kset = xfs_kset; 731 732 error = xfs_sysfs_init(&mp->m_kobj, &xfs_mp_ktype, NULL, mp->m_fsname); 732 733 if (error) 733 734 goto out;
+2 -1
fs/xfs/xfs_super.c
··· 63 63 static kmem_zone_t *xfs_ioend_zone; 64 64 mempool_t *xfs_ioend_pool; 65 65 66 - struct kset *xfs_kset; /* top-level xfs sysfs dir */ 66 + static struct kset *xfs_kset; /* top-level xfs sysfs dir */ 67 67 #ifdef DEBUG 68 68 static struct xfs_kobj xfs_dbg_kobj; /* global debug sysfs attrs */ 69 69 #endif ··· 1411 1411 atomic_set(&mp->m_active_trans, 0); 1412 1412 INIT_DELAYED_WORK(&mp->m_reclaim_work, xfs_reclaim_worker); 1413 1413 INIT_DELAYED_WORK(&mp->m_eofblocks_work, xfs_eofblocks_worker); 1414 + mp->m_kobj.kobject.kset = xfs_kset; 1414 1415 1415 1416 mp->m_super = sb; 1416 1417 sb->s_fs_info = mp;