git.openpandora.org
/
pandora-kernel.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
quota: Fix possible oops in __dquot_initialize()
[pandora-kernel.git]
/
fs
/
quota
/
dquot.c
diff --git
a/fs/quota/dquot.c
b/fs/quota/dquot.c
index
1bc38f5
..
0fed41e
100644
(file)
--- a/
fs/quota/dquot.c
+++ b/
fs/quota/dquot.c
@@
-1386,6
+1386,9
@@
static void __dquot_initialize(struct inode *inode, int type)
/* Avoid races with quotaoff() */
if (!sb_has_quota_active(sb, cnt))
continue;
+ /* We could race with quotaon or dqget() could have failed */
+ if (!got[cnt])
+ continue;
if (!inode->i_dquot[cnt]) {
inode->i_dquot[cnt] = got[cnt];
got[cnt] = NULL;