xfs: fix quotaoff mutex usage now that we don't support disabling it
authorDarrick J. Wong <djwong@kernel.org>
Wed, 15 Dec 2021 19:53:16 +0000 (11:53 -0800)
committerDarrick J. Wong <djwong@kernel.org>
Tue, 21 Dec 2021 17:49:41 +0000 (09:49 -0800)
commit59d7fab2dff96ed2ca732168859489d71fabd33b
tree7e2da7dafb205ef4152a2934c4311fe5703973e3
parent47a6df7cd3174b91c6c862eae0b8d4e13591df52
xfs: fix quotaoff mutex usage now that we don't support disabling it

Prior to commit 40b52225e58c ("xfs: remove support for disabling quota
accounting on a mounted file system"), we used the quotaoff mutex to
protect dquot operations against quotaoff trying to pull down dquots as
part of disabling quota.

Now that we only support turning off quota enforcement, the quotaoff
mutex only protects changes in m_qflags/sb_qflags.  We don't need it to
protect dquots, which means we can remove it from setqlimits and the
dquot scrub code.  While we're at it, fix the function that forces
quotacheck, since it should have been taking the quotaoff mutex.

Signed-off-by: Darrick J. Wong <djwong@kernel.org>
Reviewed-by: Dave Chinner <dchinner@redhat.com>
fs/xfs/scrub/quota.c
fs/xfs/scrub/repair.c
fs/xfs/scrub/scrub.c
fs/xfs/scrub/scrub.h
fs/xfs/xfs_qm_syscalls.c