diff options
author | Dmitry <dmonakhov@openvz.org> | 2010-10-09 23:15:30 +0400 |
---|---|---|
committer | Jan Kara <jack@suse.cz> | 2010-10-28 03:30:02 +0400 |
commit | 9e32784b71c2c84895016ca6ab271591669c02aa (patch) | |
tree | db69a152de57f65666408591a06f15cb865c695f /include/sound/emux_synth.h | |
parent | a910eefa511f9d1118effc13fba6773163502c4f (diff) | |
download | linux-9e32784b71c2c84895016ca6ab271591669c02aa.tar.xz |
quota: fix dquot_disable vs dquot_transfer race v2
I've got following lockup:
dquot_disable dquot_transfer
->dqget()
sb_has_quota_active
dqopt->flags &= ~dquot_state_flag(f, cnt) atomic_inc(dq->dq_count)
->drop_dquot_ref(sb, cnt);
down_write(dqptr_sem)
inode->i_dquot[cnt] = NULL ->__dquot_transfer
invalidate_dquots(sb, cnt); down_write(&dqptr_sem)
->wait for dq_wait_unused inode->i_dquot = new_dquot
/* wait forever */ ^^^^New quota user^^^^^^
We cannot allow new references to dquots from inodes after drop_dquot_ref()
has removed them. We have to recheck quota state under dqptr_sem and before
assignment, as we do it in dquot_initialize().
Signed-off-by: Dmitry Monakhov <dmonakhov@gmail.com>
Signed-off-by: Jan Kara <jack@suse.cz>
Diffstat (limited to 'include/sound/emux_synth.h')
0 files changed, 0 insertions, 0 deletions