diff options
Diffstat (limited to 'fs/quota/dquot.c')
-rw-r--r-- | fs/quota/dquot.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/fs/quota/dquot.c b/fs/quota/dquot.c index e0b870f4749f..f9a37513f24c 100644 --- a/fs/quota/dquot.c +++ b/fs/quota/dquot.c | |||
@@ -874,14 +874,18 @@ static int dqinit_needed(struct inode *inode, int type) | |||
874 | static void add_dquot_ref(struct super_block *sb, int type) | 874 | static void add_dquot_ref(struct super_block *sb, int type) |
875 | { | 875 | { |
876 | struct inode *inode, *old_inode = NULL; | 876 | struct inode *inode, *old_inode = NULL; |
877 | #ifdef __DQUOT_PARANOIA | ||
877 | int reserved = 0; | 878 | int reserved = 0; |
879 | #endif | ||
878 | 880 | ||
879 | spin_lock(&inode_lock); | 881 | spin_lock(&inode_lock); |
880 | list_for_each_entry(inode, &sb->s_inodes, i_sb_list) { | 882 | list_for_each_entry(inode, &sb->s_inodes, i_sb_list) { |
881 | if (inode->i_state & (I_FREEING|I_CLEAR|I_WILL_FREE|I_NEW)) | 883 | if (inode->i_state & (I_FREEING|I_CLEAR|I_WILL_FREE|I_NEW)) |
882 | continue; | 884 | continue; |
885 | #ifdef __DQUOT_PARANOIA | ||
883 | if (unlikely(inode_get_rsv_space(inode) > 0)) | 886 | if (unlikely(inode_get_rsv_space(inode) > 0)) |
884 | reserved = 1; | 887 | reserved = 1; |
888 | #endif | ||
885 | if (!atomic_read(&inode->i_writecount)) | 889 | if (!atomic_read(&inode->i_writecount)) |
886 | continue; | 890 | continue; |
887 | if (!dqinit_needed(inode, type)) | 891 | if (!dqinit_needed(inode, type)) |
@@ -903,11 +907,13 @@ static void add_dquot_ref(struct super_block *sb, int type) | |||
903 | spin_unlock(&inode_lock); | 907 | spin_unlock(&inode_lock); |
904 | iput(old_inode); | 908 | iput(old_inode); |
905 | 909 | ||
910 | #ifdef __DQUOT_PARANOIA | ||
906 | if (reserved) { | 911 | if (reserved) { |
907 | printk(KERN_WARNING "VFS (%s): Writes happened before quota" | 912 | printk(KERN_WARNING "VFS (%s): Writes happened before quota" |
908 | " was turned on thus quota information is probably " | 913 | " was turned on thus quota information is probably " |
909 | "inconsistent. Please run quotacheck(8).\n", sb->s_id); | 914 | "inconsistent. Please run quotacheck(8).\n", sb->s_id); |
910 | } | 915 | } |
916 | #endif | ||
911 | } | 917 | } |
912 | 918 | ||
913 | /* | 919 | /* |