mirror of
https://github.com/lkl/linux.git
synced 2025-12-19 16:13:19 +09:00
xfs: remove the all-mounts list
Revert commit 0ed17f01c8 ("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>
This commit is contained in:
@@ -97,7 +97,6 @@ typedef struct xfs_mount {
|
|||||||
xfs_buftarg_t *m_ddev_targp; /* saves taking the address */
|
xfs_buftarg_t *m_ddev_targp; /* saves taking the address */
|
||||||
xfs_buftarg_t *m_logdev_targp;/* ptr to log device */
|
xfs_buftarg_t *m_logdev_targp;/* ptr to log device */
|
||||||
xfs_buftarg_t *m_rtdev_targp; /* ptr to rt device */
|
xfs_buftarg_t *m_rtdev_targp; /* ptr to rt device */
|
||||||
struct list_head m_mount_list; /* global mount list */
|
|
||||||
void __percpu *m_inodegc; /* percpu inodegc structures */
|
void __percpu *m_inodegc; /* percpu inodegc structures */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|||||||
@@ -56,28 +56,6 @@ static struct kset *xfs_kset; /* top-level xfs sysfs dir */
|
|||||||
static struct xfs_kobj xfs_dbg_kobj; /* global debug sysfs attrs */
|
static struct xfs_kobj xfs_dbg_kobj; /* global debug sysfs attrs */
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef CONFIG_HOTPLUG_CPU
|
|
||||||
static LIST_HEAD(xfs_mount_list);
|
|
||||||
static DEFINE_SPINLOCK(xfs_mount_list_lock);
|
|
||||||
|
|
||||||
static inline void xfs_mount_list_add(struct xfs_mount *mp)
|
|
||||||
{
|
|
||||||
spin_lock(&xfs_mount_list_lock);
|
|
||||||
list_add(&mp->m_mount_list, &xfs_mount_list);
|
|
||||||
spin_unlock(&xfs_mount_list_lock);
|
|
||||||
}
|
|
||||||
|
|
||||||
static inline void xfs_mount_list_del(struct xfs_mount *mp)
|
|
||||||
{
|
|
||||||
spin_lock(&xfs_mount_list_lock);
|
|
||||||
list_del(&mp->m_mount_list);
|
|
||||||
spin_unlock(&xfs_mount_list_lock);
|
|
||||||
}
|
|
||||||
#else /* !CONFIG_HOTPLUG_CPU */
|
|
||||||
static inline void xfs_mount_list_add(struct xfs_mount *mp) {}
|
|
||||||
static inline void xfs_mount_list_del(struct xfs_mount *mp) {}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
enum xfs_dax_mode {
|
enum xfs_dax_mode {
|
||||||
XFS_DAX_INODE = 0,
|
XFS_DAX_INODE = 0,
|
||||||
XFS_DAX_ALWAYS = 1,
|
XFS_DAX_ALWAYS = 1,
|
||||||
@@ -1167,7 +1145,6 @@ xfs_fs_put_super(
|
|||||||
xfs_freesb(mp);
|
xfs_freesb(mp);
|
||||||
xchk_mount_stats_free(mp);
|
xchk_mount_stats_free(mp);
|
||||||
free_percpu(mp->m_stats.xs_stats);
|
free_percpu(mp->m_stats.xs_stats);
|
||||||
xfs_mount_list_del(mp);
|
|
||||||
xfs_inodegc_free_percpu(mp);
|
xfs_inodegc_free_percpu(mp);
|
||||||
xfs_destroy_percpu_counters(mp);
|
xfs_destroy_percpu_counters(mp);
|
||||||
xfs_destroy_mount_workqueues(mp);
|
xfs_destroy_mount_workqueues(mp);
|
||||||
@@ -1576,13 +1553,6 @@ xfs_fs_fill_super(
|
|||||||
if (error)
|
if (error)
|
||||||
goto out_destroy_counters;
|
goto out_destroy_counters;
|
||||||
|
|
||||||
/*
|
|
||||||
* All percpu data structures requiring cleanup when a cpu goes offline
|
|
||||||
* must be allocated before adding this @mp to the cpu-dead handler's
|
|
||||||
* mount list.
|
|
||||||
*/
|
|
||||||
xfs_mount_list_add(mp);
|
|
||||||
|
|
||||||
/* Allocate stats memory before we do operations that might use it */
|
/* Allocate stats memory before we do operations that might use it */
|
||||||
mp->m_stats.xs_stats = alloc_percpu(struct xfsstats);
|
mp->m_stats.xs_stats = alloc_percpu(struct xfsstats);
|
||||||
if (!mp->m_stats.xs_stats) {
|
if (!mp->m_stats.xs_stats) {
|
||||||
@@ -1780,7 +1750,6 @@ xfs_fs_fill_super(
|
|||||||
out_free_stats:
|
out_free_stats:
|
||||||
free_percpu(mp->m_stats.xs_stats);
|
free_percpu(mp->m_stats.xs_stats);
|
||||||
out_destroy_inodegc:
|
out_destroy_inodegc:
|
||||||
xfs_mount_list_del(mp);
|
|
||||||
xfs_inodegc_free_percpu(mp);
|
xfs_inodegc_free_percpu(mp);
|
||||||
out_destroy_counters:
|
out_destroy_counters:
|
||||||
xfs_destroy_percpu_counters(mp);
|
xfs_destroy_percpu_counters(mp);
|
||||||
@@ -2330,14 +2299,6 @@ static int
|
|||||||
xfs_cpu_dead(
|
xfs_cpu_dead(
|
||||||
unsigned int cpu)
|
unsigned int cpu)
|
||||||
{
|
{
|
||||||
struct xfs_mount *mp, *n;
|
|
||||||
|
|
||||||
spin_lock(&xfs_mount_list_lock);
|
|
||||||
list_for_each_entry_safe(mp, n, &xfs_mount_list, m_mount_list) {
|
|
||||||
spin_unlock(&xfs_mount_list_lock);
|
|
||||||
spin_lock(&xfs_mount_list_lock);
|
|
||||||
}
|
|
||||||
spin_unlock(&xfs_mount_list_lock);
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user