提交 0a51fb71 编写于 作者: K Konstantin Khlebnikov 提交者: Jan Kara

quota: add missing lock into __dquot_transfer()

Lock dq_dqb_lock around dquot_decr_inodes()
Signed-off-by: NKonstantin Khlebnikov <khlebnikov@yandex-team.ru>
Fixes: 7b9ca4c6 ("quota: Reduce contention on dq_data_lock")
Signed-off-by: NJan Kara <jack@suse.cz>
上级 0666f560
......@@ -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,
&warn_to[cnt]);
if (ret) {
spin_lock(&transfer_to[cnt]->dq_dqb_lock);
dquot_decr_inodes(transfer_to[cnt], inode_usage);
spin_unlock(&transfer_to[cnt]->dq_dqb_lock);
goto over_quota;
}
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册