summaryrefslogtreecommitdiffstats
path: root/fs/ext4/super.c
diff options
context:
space:
mode:
authorJan Kara <jack@suse.cz>2013-04-09 09:21:41 -0400
committerTheodore Ts'o <tytso@mit.edu>2013-04-09 09:21:41 -0400
commitbcb1385096caf421363d47e735acda940cb1e12b (patch)
tree64f43332e262c078b74aedb1d062aec293176b6f /fs/ext4/super.c
parente8238f9a8339b3578c85e4192a7a23bc2bdc0333 (diff)
ext4: fix deadlock with quota feature
We didn't mark hidden quota files with S_NOQUOTA flag and thus quota was accounted even for quota files. Thus we could recurse back to quota code when adding new blocks to quota file which can easily deadlock. Mark hidden quota files properly. Signed-off-by: Jan Kara <jack@suse.cz> Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Diffstat (limited to 'fs/ext4/super.c')
-rw-r--r--fs/ext4/super.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/ext4/super.c b/fs/ext4/super.c
index 525beb6e3e1e..968ca9369175 100644
--- a/fs/ext4/super.c
+++ b/fs/ext4/super.c
@@ -4953,6 +4953,8 @@ static int ext4_quota_enable(struct super_block *sb, int type, int format_id,
4953 return PTR_ERR(qf_inode); 4953 return PTR_ERR(qf_inode);
4954 } 4954 }
4955 4955
4956 /* Don't account quota for quota files to avoid recursion */
4957 qf_inode->i_flags |= S_NOQUOTA;
4956 err = dquot_enable(qf_inode, type, format_id, flags); 4958 err = dquot_enable(qf_inode, type, format_id, flags);
4957 iput(qf_inode); 4959 iput(qf_inode);
4958 4960