Commit 0a51fb71 authored by Konstantin Khlebnikov's avatar Konstantin Khlebnikov Committed by Jan Kara

quota: add missing lock into __dquot_transfer()

Lock dq_dqb_lock around dquot_decr_inodes()
Signed-off-by: default avatarKonstantin Khlebnikov <khlebnikov@yandex-team.ru>
Fixes: 7b9ca4c6 ("quota: Reduce contention on dq_data_lock")
Signed-off-by: default avatarJan Kara <jack@suse.cz>
parent 0666f560
...@@ -1980,7 +1980,9 @@ int __dquot_transfer(struct inode *inode, struct dquot **transfer_to) ...@@ -1980,7 +1980,9 @@ int __dquot_transfer(struct inode *inode, struct dquot **transfer_to)
ret = dquot_add_space(transfer_to[cnt], cur_space, rsv_space, 0, ret = dquot_add_space(transfer_to[cnt], cur_space, rsv_space, 0,
&warn_to[cnt]); &warn_to[cnt]);
if (ret) { if (ret) {
spin_lock(&transfer_to[cnt]->dq_dqb_lock);
dquot_decr_inodes(transfer_to[cnt], inode_usage); dquot_decr_inodes(transfer_to[cnt], inode_usage);
spin_unlock(&transfer_to[cnt]->dq_dqb_lock);
goto over_quota; goto over_quota;
} }
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment