]> 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)
commite6b71fd618537d8ad4afc68c043ad6fe4270a9c5
treecde16a317124eabc2547937037444c52db165095
parente524089b6cb89cf264808f2c86aa0913d92777a8
xfs: clean up xfs_bui_item_recover iget/trans_alloc/ilock ordering

commit 6acf3ee9161c7f25cfc694560968b7249f97b62c 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