summaryrefslogtreecommitdiff
path: root/fs/xfs/scrub/common.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/xfs/scrub/common.c')
-rw-r--r--fs/xfs/scrub/common.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/fs/xfs/scrub/common.c b/fs/xfs/scrub/common.c
index 0cd68814d2f9..07a168cfcbf7 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"
@@ -597,8 +598,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;
}
@@ -614,8 +614,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;
}