From patchwork Thu Oct 24 07:51:54 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ian Kent X-Patchwork-Id: 11208441 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 6C7E1112C for ; Thu, 24 Oct 2019 07:51:57 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 538842166E for ; Thu, 24 Oct 2019 07:51:57 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2408743AbfJXHv5 (ORCPT ); Thu, 24 Oct 2019 03:51:57 -0400 Received: from icp-osb-irony-out1.external.iinet.net.au ([203.59.1.210]:26989 "EHLO icp-osb-irony-out1.external.iinet.net.au" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2404960AbfJXHv4 (ORCPT ); Thu, 24 Oct 2019 03:51:56 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: A2BRAADRVrFd/0e30XYNWBwBAQEBAQcBAREBBAQBAYFpBQEBCwEBhDqEKI9JBoERiiKFIAGKE4F7CQEBAQEBAQEBATcBAYQ7AwICg1k2Bw4CDAEBAQQBAQEBAQUDAYVYgRoBAQQHAYUBAgEDIwRSEBgNAiYCAkcQBhOFdbF0dX8zGoowgQ4oAYFkikJ4gQeBETODHYdVgl4Ejz03hkBDlmyCLpVFDI4fA4skLalZCoIATS4KgydQgzYXjjBnhz2DGYVYAQE X-IPAS-Result: A2BRAADRVrFd/0e30XYNWBwBAQEBAQcBAREBBAQBAYFpBQEBCwEBhDqEKI9JBoERiiKFIAGKE4F7CQEBAQEBAQEBATcBAYQ7AwICg1k2Bw4CDAEBAQQBAQEBAQUDAYVYgRoBAQQHAYUBAgEDIwRSEBgNAiYCAkcQBhOFdbF0dX8zGoowgQ4oAYFkikJ4gQeBETODHYdVgl4Ejz03hkBDlmyCLpVFDI4fA4skLalZCoIATS4KgydQgzYXjjBnhz2DGYVYAQE X-IronPort-AV: E=Sophos;i="5.68,224,1569254400"; d="scan'208";a="250044096" Received: from unknown (HELO [192.168.1.222]) ([118.209.183.71]) by icp-osb-irony-out1.iinet.net.au with ESMTP; 24 Oct 2019 15:51:54 +0800 Subject: [PATCH v7 15/17] xfs: dont set sb in xfs_mount_alloc() From: Ian Kent To: linux-xfs Cc: Christoph Hellwig , "Darrick J. Wong" , Brian Foster , Eric Sandeen , David Howells , Dave Chinner , Al Viro Date: Thu, 24 Oct 2019 15:51:54 +0800 Message-ID: <157190351411.27074.16401313075311476494.stgit@fedora-28> In-Reply-To: <157190333868.27074.13987695222060552856.stgit@fedora-28> References: <157190333868.27074.13987695222060552856.stgit@fedora-28> User-Agent: StGit/unknown-version MIME-Version: 1.0 Sender: linux-xfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-xfs@vger.kernel.org When changing to use the new mount api the super block won't be available when struct xfs_mount is allocated so move setting the super block to xfs_fs_fill_super(). Also change xfs_mount_alloc() decalaration static -> STATIC. Signed-off-by: Ian Kent Reviewed-by: Brian Foster --- fs/xfs/xfs_super.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/fs/xfs/xfs_super.c b/fs/xfs/xfs_super.c index b3c27a0781ed..24eec22bcac1 100644 --- a/fs/xfs/xfs_super.c +++ b/fs/xfs/xfs_super.c @@ -403,8 +403,7 @@ xfs_fc_validate_params( } static struct xfs_mount * -xfs_mount_alloc( - struct super_block *sb) +xfs_mount_alloc(void) { struct xfs_mount *mp; @@ -412,7 +411,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); @@ -1652,9 +1650,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);