diff options
| author | Christoph Hellwig <hch@lst.de> | 2025-11-10 14:23:04 +0100 |
|---|---|---|
| committer | Carlos Maiolino <cem@kernel.org> | 2025-11-11 11:45:58 +0100 |
| commit | a536bf9bec6ac461ec48bc8627545d56e4e71e9c (patch) | |
| tree | c21f47f0cba4b02337b0b2d2c50c370153f6fecc | |
| parent | e85e74e4c9a64993ec5f296719705a32feca93c9 (diff) | |
xfs: push q_qlock acquisition from xchk_dquot_iter to the callers.
There is no good reason to take q_qlock in xchk_dquot_iter, which just
provides a reference to the dquot.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Darrick J. Wong <djwong@kernel.org>
Signed-off-by: Carlos Maiolino <cem@kernel.org>
| -rw-r--r-- | fs/xfs/scrub/dqiterate.c | 1 | ||||
| -rw-r--r-- | fs/xfs/scrub/quota.c | 1 | ||||
| -rw-r--r-- | fs/xfs/scrub/quota_repair.c | 1 | ||||
| -rw-r--r-- | fs/xfs/scrub/quotacheck.c | 1 | ||||
| -rw-r--r-- | fs/xfs/scrub/quotacheck_repair.c | 1 |
5 files changed, 4 insertions, 1 deletions
diff --git a/fs/xfs/scrub/dqiterate.c b/fs/xfs/scrub/dqiterate.c index 6f1185afbf39..20c4daedd48d 100644 --- a/fs/xfs/scrub/dqiterate.c +++ b/fs/xfs/scrub/dqiterate.c @@ -205,7 +205,6 @@ xchk_dquot_iter( if (error) return error; - mutex_lock(&dq->q_qlock); cursor->id = dq->q_id + 1; *dqpp = dq; return 1; diff --git a/fs/xfs/scrub/quota.c b/fs/xfs/scrub/quota.c index cfcd0fb66845..b711d36c5ec9 100644 --- a/fs/xfs/scrub/quota.c +++ b/fs/xfs/scrub/quota.c @@ -329,6 +329,7 @@ xchk_quota( /* Now look for things that the quota verifiers won't complain about. */ xchk_dqiter_init(&cursor, sc, dqtype); while ((error = xchk_dquot_iter(&cursor, &dq)) == 1) { + mutex_lock(&dq->q_qlock); error = xchk_quota_item(&sqi, dq); mutex_unlock(&dq->q_qlock); xfs_qm_dqrele(dq); diff --git a/fs/xfs/scrub/quota_repair.c b/fs/xfs/scrub/quota_repair.c index d4ce9e56d3ef..dae4889bdc84 100644 --- a/fs/xfs/scrub/quota_repair.c +++ b/fs/xfs/scrub/quota_repair.c @@ -512,6 +512,7 @@ xrep_quota_problems( xchk_dqiter_init(&cursor, sc, dqtype); while ((error = xchk_dquot_iter(&cursor, &dq)) == 1) { + mutex_lock(&dq->q_qlock); error = xrep_quota_item(&rqi, dq); mutex_unlock(&dq->q_qlock); xfs_qm_dqrele(dq); diff --git a/fs/xfs/scrub/quotacheck.c b/fs/xfs/scrub/quotacheck.c index bef63f19cd87..20220afd90f1 100644 --- a/fs/xfs/scrub/quotacheck.c +++ b/fs/xfs/scrub/quotacheck.c @@ -675,6 +675,7 @@ xqcheck_compare_dqtype( /* Compare what we observed against the actual dquots. */ xchk_dqiter_init(&cursor, sc, dqtype); while ((error = xchk_dquot_iter(&cursor, &dq)) == 1) { + mutex_lock(&dq->q_qlock); error = xqcheck_compare_dquot(xqc, dqtype, dq); mutex_unlock(&dq->q_qlock); xfs_qm_dqrele(dq); diff --git a/fs/xfs/scrub/quotacheck_repair.c b/fs/xfs/scrub/quotacheck_repair.c index 3b23219d43ed..3013211fa6c1 100644 --- a/fs/xfs/scrub/quotacheck_repair.c +++ b/fs/xfs/scrub/quotacheck_repair.c @@ -155,6 +155,7 @@ xqcheck_commit_dqtype( */ xchk_dqiter_init(&cursor, sc, dqtype); while ((error = xchk_dquot_iter(&cursor, &dq)) == 1) { + mutex_lock(&dq->q_qlock); error = xqcheck_commit_dquot(xqc, dqtype, dq); mutex_unlock(&dq->q_qlock); xfs_qm_dqrele(dq); |
