Skip to content

Commit f5bfa69

Browse files
author
Darrick J. Wong
committed
xfs: remove the all-mounts list
Revert commit 0ed17f0 ("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 <[email protected]> Reviewed-by: Dave Chinner <[email protected]>
1 parent 62334fa commit f5bfa69

File tree

2 files changed

+0
-40
lines changed

2 files changed

+0
-40
lines changed

fs/xfs/xfs_mount.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,6 @@ typedef struct xfs_mount {
9797
xfs_buftarg_t *m_ddev_targp; /* saves taking the address */
9898
xfs_buftarg_t *m_logdev_targp;/* ptr to log device */
9999
xfs_buftarg_t *m_rtdev_targp; /* ptr to rt device */
100-
struct list_head m_mount_list; /* global mount list */
101100
void __percpu *m_inodegc; /* percpu inodegc structures */
102101

103102
/*

fs/xfs/xfs_super.c

Lines changed: 0 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -56,28 +56,6 @@ static struct kset *xfs_kset; /* top-level xfs sysfs dir */
5656
static struct xfs_kobj xfs_dbg_kobj; /* global debug sysfs attrs */
5757
#endif
5858

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-
8159
enum xfs_dax_mode {
8260
XFS_DAX_INODE = 0,
8361
XFS_DAX_ALWAYS = 1,
@@ -1167,7 +1145,6 @@ xfs_fs_put_super(
11671145
xfs_freesb(mp);
11681146
xchk_mount_stats_free(mp);
11691147
free_percpu(mp->m_stats.xs_stats);
1170-
xfs_mount_list_del(mp);
11711148
xfs_inodegc_free_percpu(mp);
11721149
xfs_destroy_percpu_counters(mp);
11731150
xfs_destroy_mount_workqueues(mp);
@@ -1576,13 +1553,6 @@ xfs_fs_fill_super(
15761553
if (error)
15771554
goto out_destroy_counters;
15781555

1579-
/*
1580-
* All percpu data structures requiring cleanup when a cpu goes offline
1581-
* must be allocated before adding this @mp to the cpu-dead handler's
1582-
* mount list.
1583-
*/
1584-
xfs_mount_list_add(mp);
1585-
15861556
/* Allocate stats memory before we do operations that might use it */
15871557
mp->m_stats.xs_stats = alloc_percpu(struct xfsstats);
15881558
if (!mp->m_stats.xs_stats) {
@@ -1780,7 +1750,6 @@ xfs_fs_fill_super(
17801750
out_free_stats:
17811751
free_percpu(mp->m_stats.xs_stats);
17821752
out_destroy_inodegc:
1783-
xfs_mount_list_del(mp);
17841753
xfs_inodegc_free_percpu(mp);
17851754
out_destroy_counters:
17861755
xfs_destroy_percpu_counters(mp);
@@ -2330,14 +2299,6 @@ static int
23302299
xfs_cpu_dead(
23312300
unsigned int cpu)
23322301
{
2333-
struct xfs_mount *mp, *n;
2334-
2335-
spin_lock(&xfs_mount_list_lock);
2336-
list_for_each_entry_safe(mp, n, &xfs_mount_list, m_mount_list) {
2337-
spin_unlock(&xfs_mount_list_lock);
2338-
spin_lock(&xfs_mount_list_lock);
2339-
}
2340-
spin_unlock(&xfs_mount_list_lock);
23412302
return 0;
23422303
}
23432304

0 commit comments

Comments
 (0)