diff options
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 952dfb234bf2..971bc43d039c 100644 --- a/fs/xfs/scrub/common.c +++ b/fs/xfs/scrub/common.c @@ -27,6 +27,7 @@ #include "xfs_trans_priv.h" #include "xfs_attr.h" #include "xfs_reflink.h" +#include "xfs_rtalloc.h" #include "scrub/scrub.h" #include "scrub/common.h" #include "scrub/trace.h" @@ -610,8 +611,7 @@ xchk_rt_init( struct xfs_mount *mp = sc->mp; memset(sr, 0, sizeof(*sr)); - xfs_ilock(mp->m_rbmip, XFS_ILOCK_EXCL | XFS_ILOCK_RTBITMAP); - xfs_ilock(mp->m_rsumip, XFS_ILOCK_EXCL | XFS_ILOCK_RTSUM); + xfs_rtlock(NULL, mp, XFS_RTLOCK_ALL); sr->locked = true; } @@ -627,8 +627,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; } |