diff options
author | Darrick J. Wong <darrick.wong@oracle.com> | 2018-05-14 16:34:32 +0300 |
---|---|---|
committer | Darrick J. Wong <darrick.wong@oracle.com> | 2018-05-16 04:12:50 +0300 |
commit | 8bc763c24de745608679b128e2e5e25c5070f7d3 (patch) | |
tree | 11c6f4f21f3709f61aa10ab734b4e3fd44474708 /fs/xfs/scrub/parent.c | |
parent | eac69e167665d342b741986e9d0b53a0a26a6608 (diff) | |
download | linux-8bc763c24de745608679b128e2e5e25c5070f7d3.tar.xz |
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/parent.c')
-rw-r--r-- | fs/xfs/scrub/parent.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/fs/xfs/scrub/parent.c b/fs/xfs/scrub/parent.c index 1fb88c18d455..fc336807e156 100644 --- a/fs/xfs/scrub/parent.c +++ b/fs/xfs/scrub/parent.c @@ -147,6 +147,9 @@ xfs_scrub_parent_validate( *try_again = false; + if (sc->sm->sm_flags & XFS_SCRUB_OFLAG_CORRUPT) + goto out; + /* '..' must not point to ourselves. */ if (sc->ip->i_ino == dnum) { xfs_scrub_fblock_set_corrupt(sc, XFS_DATA_FORK, 0); |