ocfs2: Mark system files as not subject to quota accounting
authorJan Kara <jack@suse.cz>
Thu, 21 Aug 2008 16:22:30 +0000 (18:22 +0200)
committerMark Fasheh <mfasheh@suse.com>
Mon, 5 Jan 2009 16:40:23 +0000 (08:40 -0800)
Mark system files as not subject to quota accounting. This prevents
possible recursions into quota code and thus deadlocks.

Signed-off-by: Jan Kara <jack@suse.cz>
Signed-off-by: Mark Fasheh <mfasheh@suse.com>
fs/ocfs2/inode.c

index ec25d99841925dabfee3e406861cc1b954bb31db..50dbc486ef713d90d7bea73a9a2a50f27ca86c75 100644 (file)
@@ -275,8 +275,10 @@ void ocfs2_populate_inode(struct inode *inode, struct ocfs2_dinode *fe,
 
        inode->i_nlink = le16_to_cpu(fe->i_links_count);
 
-       if (fe->i_flags & cpu_to_le32(OCFS2_SYSTEM_FL))
+       if (fe->i_flags & cpu_to_le32(OCFS2_SYSTEM_FL)) {
                OCFS2_I(inode)->ip_flags |= OCFS2_INODE_SYSTEM_FILE;
+               inode->i_flags |= S_NOQUOTA;
+       }
 
        if (fe->i_flags & cpu_to_le32(OCFS2_LOCAL_ALLOC_FL)) {
                OCFS2_I(inode)->ip_flags |= OCFS2_INODE_BITMAP;