* [PATCH] ext4: Fix deadlock with quota feature
@ 2013-04-05 10:06 Jan Kara
2013-04-09 13:20 ` Theodore Ts'o
0 siblings, 1 reply; 2+ messages in thread
From: Jan Kara @ 2013-04-05 10:06 UTC (permalink / raw)
To: Ted Tso; +Cc: linux-ext4, Jan Kara
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>
---
fs/ext4/super.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/fs/ext4/super.c b/fs/ext4/super.c
index 5d6d535..fc203b3 100644
--- a/fs/ext4/super.c
+++ b/fs/ext4/super.c
@@ -4945,6 +4945,8 @@ static int ext4_quota_enable(struct super_block *sb, int type, int format_id,
return PTR_ERR(qf_inode);
}
+ /* Don't account quota for quota files to avoid recursion */
+ qf_inode->i_flags |= S_NOQUOTA;
err = dquot_enable(qf_inode, type, format_id, flags);
iput(qf_inode);
--
1.7.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2013-04-09 13:20 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-04-05 10:06 [PATCH] ext4: Fix deadlock with quota feature Jan Kara
2013-04-09 13:20 ` Theodore Ts'o
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).