summaryrefslogtreecommitdiff
path: root/fs/xfs/xfs_super.c
diff options
context:
space:
mode:
authorIan Kent <raven@themaw.net>2019-11-05 00:58:46 +0300
committerDarrick J. Wong <darrick.wong@oracle.com>2019-11-05 19:28:26 +0300
commit7c89fcb2783d758d16f68e579811d5395d907960 (patch)
treeb7582399a269f3a1308df1687ea4dff612fda56f /fs/xfs/xfs_super.c
parent9a861816a02653dcec7a97d4f639f04b0bcf09c3 (diff)
downloadlinux-7c89fcb2783d758d16f68e579811d5395d907960.tar.xz
xfs: dont set sb in xfs_mount_alloc()
When changing to use the new mount api the super block won't be available when the xfs_mount struct is allocated so move setting the super block in xfs_mount to xfs_fs_fill_super(). Signed-off-by: Ian Kent <raven@themaw.net> Reviewed-by: Brian Foster <bfoster@redhat.com> Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com> Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Diffstat (limited to 'fs/xfs/xfs_super.c')
-rw-r--r--fs/xfs/xfs_super.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/fs/xfs/xfs_super.c b/fs/xfs/xfs_super.c
index 4b570ba3456a..62dfc678c415 100644
--- a/fs/xfs/xfs_super.c
+++ b/fs/xfs/xfs_super.c
@@ -1560,8 +1560,7 @@ xfs_destroy_percpu_counters(
}
static struct xfs_mount *
-xfs_mount_alloc(
- struct super_block *sb)
+xfs_mount_alloc(void)
{
struct xfs_mount *mp;
@@ -1569,7 +1568,6 @@ xfs_mount_alloc(
if (!mp)
return NULL;
- mp->m_super = sb;
spin_lock_init(&mp->m_sb_lock);
spin_lock_init(&mp->m_agirotor_lock);
INIT_RADIX_TREE(&mp->m_perag_tree, GFP_ATOMIC);
@@ -1605,9 +1603,10 @@ xfs_fs_fill_super(
* allocate mp and do all low-level struct initializations before we
* attach it to the super
*/
- mp = xfs_mount_alloc(sb);
+ mp = xfs_mount_alloc();
if (!mp)
goto out;
+ mp->m_super = sb;
sb->s_fs_info = mp;
error = xfs_parseargs(mp, (char *)data);