Skip to content

Commit ee1ac54

Browse files
committed
quota: Remove dqonoff_mutex from dquot_scan_active()
All callers of dquot_scan_active() now hold s_umount so we can rely on that lock to protect us against quota state changes. Signed-off-by: Jan Kara <jack@suse.cz>
1 parent 2a64f80 commit ee1ac54

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

fs/quota/dquot.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -572,7 +572,8 @@ int dquot_scan_active(struct super_block *sb,
572572
struct dquot *dquot, *old_dquot = NULL;
573573
int ret = 0;
574574

575-
mutex_lock(&sb_dqopt(sb)->dqonoff_mutex);
575+
WARN_ON_ONCE(!rwsem_is_locked(&sb->s_umount));
576+
576577
spin_lock(&dq_list_lock);
577578
list_for_each_entry(dquot, &inuse_list, dq_inuse) {
578579
if (!test_bit(DQ_ACTIVE_B, &dquot->dq_flags))
@@ -603,7 +604,6 @@ int dquot_scan_active(struct super_block *sb,
603604
spin_unlock(&dq_list_lock);
604605
out:
605606
dqput(old_dquot);
606-
mutex_unlock(&sb_dqopt(sb)->dqonoff_mutex);
607607
return ret;
608608
}
609609
EXPORT_SYMBOL(dquot_scan_active);

0 commit comments

Comments
 (0)