xfs: avoid ilock games in the quota scrubber
authorDarrick J. Wong <darrick.wong@oracle.com>
Wed, 9 May 2018 17:02:00 +0000 (10:02 -0700)
committerDarrick J. Wong <darrick.wong@oracle.com>
Wed, 16 May 2018 00:57:05 +0000 (17:57 -0700)
commiteb41c93fef19ebcafbbe3c180ec41c21032b751e
tree0c98d5216d4f6ee7d893f71c5076d3b3bbe1c398
parent554ba965407e90fed381a93f230b6ca675cfcd07
xfs: avoid ilock games in the quota scrubber

Refactor the quota scrubber to take the quotaofflock and grab the quota
inode in the setup function so that we can treat quota in the same
"scrub in the context of this inode" (i.e. sc->ip) manner as we treat
any other inode.  We do have to drop the quota inode's ILOCK_EXCL to use
dqiterate, but since dquots have their own individual locks the ILOCK
wasn't helping us anyway.

Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Reviewed-by: Brian Foster <bfoster@redhat.com>
fs/xfs/scrub/quota.c
fs/xfs/scrub/scrub.c
fs/xfs/scrub/scrub.h