summaryrefslogtreecommitdiff
path: root/fs/xfs/scrub/quota.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/xfs/scrub/quota.c')
-rw-r--r--fs/xfs/scrub/quota.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/fs/xfs/scrub/quota.c b/fs/xfs/scrub/quota.c
index 085ff234f6ba..714bd4c0753a 100644
--- a/fs/xfs/scrub/quota.c
+++ b/fs/xfs/scrub/quota.c
@@ -17,9 +17,10 @@
#include "xfs_bmap.h"
#include "scrub/scrub.h"
#include "scrub/common.h"
+#include "scrub/quota.h"
/* Convert a scrub type code to a DQ flag, or return 0 if error. */
-static inline xfs_dqtype_t
+xfs_dqtype_t
xchk_quota_to_dqtype(
struct xfs_scrub *sc)
{
@@ -226,7 +227,10 @@ xchk_quota(
dqtype = xchk_quota_to_dqtype(sc);
- /* Look for problem extents. */
+ /*
+ * Look for problem extents. Leave the quota inode ILOCKd if we find
+ * any.
+ */
error = xchk_quota_data_fork(sc);
if (error)
goto out;
@@ -239,10 +243,11 @@ xchk_quota(
* functions.
*/
xchk_iunlock(sc, sc->ilock_flags);
+
+ /* Now look for things that the quota verifiers won't complain about. */
sqi.sc = sc;
sqi.last_id = 0;
error = xfs_qm_dqiterate(mp, dqtype, xchk_quota_item, &sqi);
- xchk_ilock(sc, XFS_ILOCK_EXCL);
if (error == -ECANCELED)
error = 0;
if (!xchk_fblock_process_error(sc, XFS_DATA_FORK,