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 dc117954823b..41f1d871355e 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" @@ -608,8 +609,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; } @@ -625,8 +625,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; } |