diff options
author | Darrick J. Wong <djwong@kernel.org> | 2021-09-01 11:15:55 -0700 |
---|---|---|
committer | Darrick J. Wong <djwong@kernel.org> | 2021-12-15 17:29:11 -0800 |
commit | ffe7e7772e191c6f9ebbd4ee383fe8e01df3132b (patch) | |
tree | c28395b40881030bfc89276b2103ab09e628af0b /fs/xfs/scrub/common.c | |
parent | 48fb408a0c736ea2c1f5557286de1c7026937267 (diff) |
xfs: refactor realtime inode lockingrefactor-rt-locking_2021-12-15
Refactor realtime metadata inode locking so that we can get some sense
here.
Signed-off-by: Darrick J. Wong <djwong@kernel.org>
Diffstat (limited to 'fs/xfs/scrub/common.c')
-rw-r--r-- | fs/xfs/scrub/common.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/fs/xfs/scrub/common.c b/fs/xfs/scrub/common.c index 6575d5392d0d..615032d69078 100644 --- a/fs/xfs/scrub/common.c +++ b/fs/xfs/scrub/common.c @@ -28,6 +28,7 @@ #include "xfs_reflink.h" #include "xfs_ag.h" #include "xfs_error.h" +#include "xfs_rtalloc.h" #include "scrub/scrub.h" #include "scrub/common.h" #include "scrub/trace.h" @@ -609,8 +610,7 @@ xchk_rt_init( struct xfs_scrub *sc, struct xchk_rt *sr) { - xfs_ilock(sc->mp->m_rbmip, XFS_ILOCK_EXCL | XFS_ILOCK_RTBITMAP); - xfs_ilock(sc->mp->m_rsumip, XFS_ILOCK_EXCL | XFS_ILOCK_RTSUM); + xfs_rtlock(NULL, sc->mp, XFS_RTLOCK_ALL); sr->locked = true; } @@ -626,8 +626,7 @@ xchk_rt_unlock( if (!sr->locked) return; - xfs_iunlock(sc->mp->m_rsumip, XFS_ILOCK_EXCL); - xfs_iunlock(sc->mp->m_rbmip, XFS_ILOCK_EXCL); + xfs_rtunlock(sc->mp, XFS_RTLOCK_ALL); sr->locked = false; } |