Commit bbbd0eb3 authored by Jan Kara's avatar Jan Kara Committed by Mark Fasheh
Browse files

ocfs2: Mark system files as not subject to quota accounting



Mark system files as not subject to quota accounting. This prevents
possible recursions into quota code and thus deadlocks.

Signed-off-by: default avatarJan Kara <jack@suse.cz>
Signed-off-by: default avatarMark Fasheh <mfasheh@suse.com>
parent 1a224ad1
Loading
Loading
Loading
Loading
+3 −1
Original line number Original line Diff line number Diff line
@@ -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);
	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;
		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)) {
	if (fe->i_flags & cpu_to_le32(OCFS2_LOCAL_ALLOC_FL)) {
		OCFS2_I(inode)->ip_flags |= OCFS2_INODE_BITMAP;
		OCFS2_I(inode)->ip_flags |= OCFS2_INODE_BITMAP;