diff options
Diffstat (limited to 'fs/quota')
-rw-r--r-- | fs/quota/dquot.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/fs/quota/dquot.c b/fs/quota/dquot.c index 1bc38f56fa7c..0fed41e6efcd 100644 --- a/fs/quota/dquot.c +++ b/fs/quota/dquot.c | |||
@@ -1386,6 +1386,9 @@ static void __dquot_initialize(struct inode *inode, int type) | |||
1386 | /* Avoid races with quotaoff() */ | 1386 | /* Avoid races with quotaoff() */ |
1387 | if (!sb_has_quota_active(sb, cnt)) | 1387 | if (!sb_has_quota_active(sb, cnt)) |
1388 | continue; | 1388 | continue; |
1389 | /* We could race with quotaon or dqget() could have failed */ | ||
1390 | if (!got[cnt]) | ||
1391 | continue; | ||
1389 | if (!inode->i_dquot[cnt]) { | 1392 | if (!inode->i_dquot[cnt]) { |
1390 | inode->i_dquot[cnt] = got[cnt]; | 1393 | inode->i_dquot[cnt] = got[cnt]; |
1391 | got[cnt] = NULL; | 1394 | got[cnt] = NULL; |