mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2025-01-09 06:33:34 +00:00
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>
This commit is contained in:
parent
2a64f80ee3
commit
ee1ac541a2
@ -572,7 +572,8 @@ int dquot_scan_active(struct super_block *sb,
|
|||||||
struct dquot *dquot, *old_dquot = NULL;
|
struct dquot *dquot, *old_dquot = NULL;
|
||||||
int ret = 0;
|
int ret = 0;
|
||||||
|
|
||||||
mutex_lock(&sb_dqopt(sb)->dqonoff_mutex);
|
WARN_ON_ONCE(!rwsem_is_locked(&sb->s_umount));
|
||||||
|
|
||||||
spin_lock(&dq_list_lock);
|
spin_lock(&dq_list_lock);
|
||||||
list_for_each_entry(dquot, &inuse_list, dq_inuse) {
|
list_for_each_entry(dquot, &inuse_list, dq_inuse) {
|
||||||
if (!test_bit(DQ_ACTIVE_B, &dquot->dq_flags))
|
if (!test_bit(DQ_ACTIVE_B, &dquot->dq_flags))
|
||||||
@ -603,7 +604,6 @@ int dquot_scan_active(struct super_block *sb,
|
|||||||
spin_unlock(&dq_list_lock);
|
spin_unlock(&dq_list_lock);
|
||||||
out:
|
out:
|
||||||
dqput(old_dquot);
|
dqput(old_dquot);
|
||||||
mutex_unlock(&sb_dqopt(sb)->dqonoff_mutex);
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
EXPORT_SYMBOL(dquot_scan_active);
|
EXPORT_SYMBOL(dquot_scan_active);
|
||||||
|
Loading…
Reference in New Issue
Block a user