xfs: free the xfs_mount in ->kill_sb
authorChristoph Hellwig <hch@lst.de>
Wed, 9 Aug 2023 22:05:35 +0000 (15:05 -0700)
committerChristian Brauner <brauner@kernel.org>
Thu, 10 Aug 2023 08:34:54 +0000 (10:34 +0200)
commit2a9311adb87c98599989b80405fe2c60cd4075dd
tree39df3f9806db9fbe040c34fb66ac2ef5c67f69d8
parent1aa2d074d4c777e2150382878d0a5611d829b380
xfs: free the xfs_mount in ->kill_sb

As a rule of thumb everything allocated to the fs_context and moved into
the super_block should be freed by ->kill_sb so that the teardown
handling doesn't need to be duplicated between the fill_super error
path and put_super.  Implement a XFS-specific kill_sb method to do that.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Christian Brauner <brauner@kernel.org>
Reviewed-by: "Darrick J. Wong" <djwong@kernel.org>
Message-Id: <20230809220545.1308228-4-hch@lst.de>
Signed-off-by: Christian Brauner <brauner@kernel.org>
fs/xfs/xfs_super.c