Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1729413
| From | Konstantin Khlebnikov <khlebnikov@yandex-team.ru> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH] quota: add missing lock into __dquot_transfer() |
| Date | 2017-09-09 11:20 +0200 |
| Message-ID | <unK5I-3pd-9@gated-at.bofh.it> (permalink) |
| Organization | linux.* mail to news gateway |
Lock dq_dqb_lock around dquot_decr_inodes()
Signed-off-by: Konstantin Khlebnikov <khlebnikov@yandex-team.ru>
Fixes: 7b9ca4c61bc2 ("quota: Reduce contention on dq_data_lock")
---
fs/quota/dquot.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/fs/quota/dquot.c b/fs/quota/dquot.c
index 8381db9db6d9..50b0556a124f 100644
--- a/fs/quota/dquot.c
+++ b/fs/quota/dquot.c
@@ -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;
}
}
Back to linux.kernel | Previous | Next | Find similar | Unroll thread
[PATCH] quota: add missing lock into __dquot_transfer() Konstantin Khlebnikov <khlebnikov@yandex-team.ru> - 2017-09-09 11:20 +0200
csiph-web