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

xfs: remove the all-mounts list

Revert commit 0ed17f01c8540 ("xfs: introduce all-mounts list for cpu
hotplug notifications") because the cpu hotplug hooks are now pointless,
so we don't need this list anymore.

Signed-off-by: Darrick J. Wong <djwong@kernel.org>
Reviewed-by: Dave Chinner <dchinner@redhat.com>

-40
-1
fs/xfs/xfs_mount.h
··· 97 97 xfs_buftarg_t *m_ddev_targp; /* saves taking the address */ 98 98 xfs_buftarg_t *m_logdev_targp;/* ptr to log device */ 99 99 xfs_buftarg_t *m_rtdev_targp; /* ptr to rt device */ 100 - struct list_head m_mount_list; /* global mount list */ 101 100 void __percpu *m_inodegc; /* percpu inodegc structures */ 102 101 103 102 /*
-39
fs/xfs/xfs_super.c
··· 56 56 static struct xfs_kobj xfs_dbg_kobj; /* global debug sysfs attrs */ 57 57 #endif 58 58 59 - #ifdef CONFIG_HOTPLUG_CPU 60 - static LIST_HEAD(xfs_mount_list); 61 - static DEFINE_SPINLOCK(xfs_mount_list_lock); 62 - 63 - static inline void xfs_mount_list_add(struct xfs_mount *mp) 64 - { 65 - spin_lock(&xfs_mount_list_lock); 66 - list_add(&mp->m_mount_list, &xfs_mount_list); 67 - spin_unlock(&xfs_mount_list_lock); 68 - } 69 - 70 - static inline void xfs_mount_list_del(struct xfs_mount *mp) 71 - { 72 - spin_lock(&xfs_mount_list_lock); 73 - list_del(&mp->m_mount_list); 74 - spin_unlock(&xfs_mount_list_lock); 75 - } 76 - #else /* !CONFIG_HOTPLUG_CPU */ 77 - static inline void xfs_mount_list_add(struct xfs_mount *mp) {} 78 - static inline void xfs_mount_list_del(struct xfs_mount *mp) {} 79 - #endif 80 - 81 59 enum xfs_dax_mode { 82 60 XFS_DAX_INODE = 0, 83 61 XFS_DAX_ALWAYS = 1, ··· 1145 1167 xfs_freesb(mp); 1146 1168 xchk_mount_stats_free(mp); 1147 1169 free_percpu(mp->m_stats.xs_stats); 1148 - xfs_mount_list_del(mp); 1149 1170 xfs_inodegc_free_percpu(mp); 1150 1171 xfs_destroy_percpu_counters(mp); 1151 1172 xfs_destroy_mount_workqueues(mp); ··· 1553 1576 if (error) 1554 1577 goto out_destroy_counters; 1555 1578 1556 - /* 1557 - * All percpu data structures requiring cleanup when a cpu goes offline 1558 - * must be allocated before adding this @mp to the cpu-dead handler's 1559 - * mount list. 1560 - */ 1561 - xfs_mount_list_add(mp); 1562 - 1563 1579 /* Allocate stats memory before we do operations that might use it */ 1564 1580 mp->m_stats.xs_stats = alloc_percpu(struct xfsstats); 1565 1581 if (!mp->m_stats.xs_stats) { ··· 1750 1780 out_free_stats: 1751 1781 free_percpu(mp->m_stats.xs_stats); 1752 1782 out_destroy_inodegc: 1753 - xfs_mount_list_del(mp); 1754 1783 xfs_inodegc_free_percpu(mp); 1755 1784 out_destroy_counters: 1756 1785 xfs_destroy_percpu_counters(mp); ··· 2299 2330 xfs_cpu_dead( 2300 2331 unsigned int cpu) 2301 2332 { 2302 - struct xfs_mount *mp, *n; 2303 - 2304 - spin_lock(&xfs_mount_list_lock); 2305 - list_for_each_entry_safe(mp, n, &xfs_mount_list, m_mount_list) { 2306 - spin_unlock(&xfs_mount_list_lock); 2307 - spin_lock(&xfs_mount_list_lock); 2308 - } 2309 - spin_unlock(&xfs_mount_list_lock); 2310 2333 return 0; 2311 2334 } 2312 2335