aboutsummaryrefslogtreecommitdiffstats
path: root/fs/xfs/scrub/bmap.c
diff options
context:
space:
mode:
authorDarrick J. Wong <darrick.wong@oracle.com>2018-05-14 06:34:32 -0700
committerDarrick J. Wong <darrick.wong@oracle.com>2018-05-15 18:12:50 -0700
commit8bc763c24de745608679b128e2e5e25c5070f7d3 (patch)
tree11c6f4f21f3709f61aa10ab734b4e3fd44474708 /fs/xfs/scrub/bmap.c
parentxfs: refactor quota limits initialization (diff)
downloadlinux-dev-8bc763c24de745608679b128e2e5e25c5070f7d3.tar.xz
linux-dev-8bc763c24de745608679b128e2e5e25c5070f7d3.zip
xfs: don't continue scrub if already corrupt
If we've already decided that something is corrupt, we might as well abort all the loops and exit as quickly as possible. Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com> Reviewed-by: Brian Foster <bfoster@redhat.com>
Diffstat (limited to 'fs/xfs/scrub/bmap.c')
-rw-r--r--fs/xfs/scrub/bmap.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/xfs/scrub/bmap.c b/fs/xfs/scrub/bmap.c
index e5a4611abf86..42a115e83739 100644
--- a/fs/xfs/scrub/bmap.c
+++ b/fs/xfs/scrub/bmap.c
@@ -683,7 +683,8 @@ xfs_scrub_bmap(
info.lastoff = 0;
ifp = XFS_IFORK_PTR(ip, whichfork);
for_each_xfs_iext(ifp, &icur, &irec) {
- if (xfs_scrub_should_terminate(sc, &error))
+ if (xfs_scrub_should_terminate(sc, &error) ||
+ (sc->sm->sm_flags & XFS_SCRUB_OFLAG_CORRUPT))
break;
if (isnullstartblock(irec.br_startblock))
continue;