diff --git a/fs/ext4/super.c b/fs/ext4/super.c
index 525beb6e3e1e8..968ca93691751 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,
 		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);