xfs: push transaction join out of xfs_rtbitmap_lock and xfs_rtgroup_lock

To prepare for being able to join an already locked rtbitmap inode to a
transaction split out separate helpers for joining the transaction from
the locking helpers.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Darrick J. Wong <djwong@kernel.org>
Signed-off-by: Darrick J. Wong <djwong@kernel.org>
This commit is contained in:
Christoph Hellwig
2024-08-30 15:36:59 -07:00
committed by Darrick J. Wong
parent 2a95ffc44b
commit 0a59e4f3e1
4 changed files with 23 additions and 16 deletions

View File

@@ -739,7 +739,8 @@ xfs_growfs_rt_bmblock(
goto out_free;
nargs.tp = args.tp;
xfs_rtbitmap_lock(args.tp, mp);
xfs_rtbitmap_lock(mp);
xfs_rtbitmap_trans_join(args.tp);
/*
* Update the bitmap inode's size ondisk and incore. We need to update
@@ -1313,7 +1314,8 @@ retry:
* Lock out modifications to both the RT bitmap and summary inodes
*/
if (!rtlocked) {
xfs_rtbitmap_lock(ap->tp, mp);
xfs_rtbitmap_lock(mp);
xfs_rtbitmap_trans_join(ap->tp);
rtlocked = true;
}