From 0101f366c421bfc8c145e5b5a03872d5e77c2956 Mon Sep 17 00:00:00 2001 From: Jan Kara Date: Tue, 19 Oct 2010 00:24:21 +0200 Subject: [PATCH] --- yaml --- r: 218846 b: refs/heads/master c: 4408ea41c0ab4b711d4da44dd954fb06dce6c3f8 h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/fs/quota/dquot.c | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/[refs] b/[refs] index 022eee7ce732..10a8e7abca73 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: a4c18ad2eed93194a667cb9f6662c3b3e8f0bba9 +refs/heads/master: 4408ea41c0ab4b711d4da44dd954fb06dce6c3f8 diff --git a/trunk/fs/quota/dquot.c b/trunk/fs/quota/dquot.c index 1bc38f56fa7c..0fed41e6efcd 100644 --- a/trunk/fs/quota/dquot.c +++ b/trunk/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;