diff options
author | Darrick J. Wong <darrick.wong@oracle.com> | 2019-04-16 17:22:00 +0200 |
---|---|---|
committer | Darrick J. Wong <darrick.wong@oracle.com> | 2019-04-16 19:01:57 +0200 |
commit | 160b5a784525e8a44902873f1938e1f4d77fe112 (patch) | |
tree | 5f7df442f9d137e108140020c8910deb755c19fc /fs/xfs/scrub/scrub.c | |
parent | xfs: collapse scrub bool state flags into a single unsigned int (diff) | |
download | linux-160b5a784525e8a44902873f1938e1f4d77fe112.tar.xz linux-160b5a784525e8a44902873f1938e1f4d77fe112.zip |
xfs: hoist the already_fixed variable to the scrub context
Now that we no longer memset the scrub context, we can move the
already_fixed variable into the scrub context's state flags instead of
passing around pointers to separate stack variables.
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Reviewed-by: Dave Chinner <dchinner@redhat.com>
Diffstat (limited to 'fs/xfs/scrub/scrub.c')
-rw-r--r-- | fs/xfs/scrub/scrub.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/fs/xfs/scrub/scrub.c b/fs/xfs/scrub/scrub.c index 6e18a1178e26..02d278b7d20b 100644 --- a/fs/xfs/scrub/scrub.c +++ b/fs/xfs/scrub/scrub.c @@ -476,7 +476,6 @@ xfs_scrub_metadata( }, }; struct xfs_mount *mp = ip->i_mount; - bool already_fixed = false; int error = 0; BUILD_BUG_ON(sizeof(meta_scrub_ops) != @@ -521,7 +520,8 @@ retry_op: } else if (error) goto out_teardown; - if ((sc.sm->sm_flags & XFS_SCRUB_IFLAG_REPAIR) && !already_fixed) { + if ((sc.sm->sm_flags & XFS_SCRUB_IFLAG_REPAIR) && + !(sc.flags & XREP_ALREADY_FIXED)) { bool needs_fix; /* Let debug users force us into the repair routines. */ @@ -544,7 +544,7 @@ retry_op: * If it's broken, userspace wants us to fix it, and we haven't * already tried to fix it, then attempt a repair. */ - error = xrep_attempt(ip, &sc, &already_fixed); + error = xrep_attempt(ip, &sc); if (error == -EAGAIN) { /* * Either the repair function succeeded or it couldn't |