]> git.baikalelectronics.ru Git - kernel.git/commit
xfs: clean up xfs_bui_item_recover iget/trans_alloc/ilock ordering
authorDarrick J. Wong <darrick.wong@oracle.com>
Thu, 16 Feb 2023 05:20:09 +0000 (10:50 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 22 Feb 2023 11:50:37 +0000 (12:50 +0100)
commit1d06ce0f8a4ebfa33eae73559c9f36cf2d36d48f
treecde16a317124eabc2547937037444c52db165095
parentc268799711a0395a4b341a964951f959a63918df
xfs: clean up xfs_bui_item_recover iget/trans_alloc/ilock ordering

commit 1afdfb19add1de1b78300ec8e5ebec2873e457cb upstream.

In most places in XFS, we have a specific order in which we gather
resources: grab the inode, allocate a transaction, then lock the inode.
xfs_bui_item_recover doesn't do it in that order, so fix it to be more
consistent.  This also makes the error bailout code a bit less weird.

Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Reviewed-by: Dave Chinner <dchinner@redhat.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Brian Foster <bfoster@redhat.com>
Signed-off-by: Chandan Babu R <chandan.babu@oracle.com>
Acked-by: Darrick J. Wong <djwong@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/xfs/xfs_bmap_item.c