diff options
author | Darrick J. Wong <darrick.wong@oracle.com> | 2019-04-16 18:21:59 +0300 |
---|---|---|
committer | Darrick J. Wong <darrick.wong@oracle.com> | 2019-04-16 20:01:57 +0300 |
commit | f8c2a2257ca12fb3a04830bbacc85ce860f04ba9 (patch) | |
tree | 6f7c3b5d9e07ddf2dd643008df046122fdc2add0 /fs/xfs/scrub/scrub.c | |
parent | 9d71e15586fd7d274a23dd0bbf54278c86fe263f (diff) | |
download | linux-f8c2a2257ca12fb3a04830bbacc85ce860f04ba9.tar.xz |
xfs: collapse scrub bool state flags into a single unsigned int
Combine all the boolean state flags in struct xfs_scrub into a single
unsigned int, because we're going to be adding more state flags soon.
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 | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/fs/xfs/scrub/scrub.c b/fs/xfs/scrub/scrub.c index 08df00911dd3..6e18a1178e26 100644 --- a/fs/xfs/scrub/scrub.c +++ b/fs/xfs/scrub/scrub.c @@ -186,9 +186,9 @@ xchk_teardown( xfs_irele(sc->ip); sc->ip = NULL; } - if (sc->has_quotaofflock) { + if (sc->flags & XCHK_HAS_QUOTAOFFLOCK) { mutex_unlock(&sc->mp->m_quotainfo->qi_quotaofflock); - sc->has_quotaofflock = false; + sc->flags &= ~XCHK_HAS_QUOTAOFFLOCK; } if (sc->buf) { kmem_free(sc->buf); @@ -507,7 +507,7 @@ retry_op: /* Scrub for errors. */ error = sc.ops->scrub(&sc); - if (!sc.try_harder && error == -EDEADLOCK) { + if (!(sc.flags & XCHK_TRY_HARDER) && error == -EDEADLOCK) { /* * Scrubbers return -EDEADLOCK to mean 'try harder'. * Tear down everything we hold, then set up again with @@ -516,7 +516,7 @@ retry_op: error = xchk_teardown(&sc, ip, 0); if (error) goto out; - sc.try_harder = true; + sc.flags |= XCHK_TRY_HARDER; goto retry_op; } else if (error) goto out_teardown; |