diff options
Diffstat (limited to 'fs/quota')
-rw-r--r-- | fs/quota/dquot.c | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/fs/quota/dquot.c b/fs/quota/dquot.c index 12c233da1b6b..a5974c49a78b 100644 --- a/fs/quota/dquot.c +++ b/fs/quota/dquot.c | |||
@@ -986,6 +986,7 @@ static void remove_dquot_ref(struct super_block *sb, int type, | |||
986 | struct list_head *tofree_head) | 986 | struct list_head *tofree_head) |
987 | { | 987 | { |
988 | struct inode *inode; | 988 | struct inode *inode; |
989 | int reserved = 0; | ||
989 | 990 | ||
990 | spin_lock(&inode_lock); | 991 | spin_lock(&inode_lock); |
991 | list_for_each_entry(inode, &sb->s_inodes, i_sb_list) { | 992 | list_for_each_entry(inode, &sb->s_inodes, i_sb_list) { |
@@ -995,10 +996,20 @@ static void remove_dquot_ref(struct super_block *sb, int type, | |||
995 | * only quota pointers and these have separate locking | 996 | * only quota pointers and these have separate locking |
996 | * (dqptr_sem). | 997 | * (dqptr_sem). |
997 | */ | 998 | */ |
998 | if (!IS_NOQUOTA(inode)) | 999 | if (!IS_NOQUOTA(inode)) { |
1000 | if (unlikely(inode_get_rsv_space(inode) > 0)) | ||
1001 | reserved = 1; | ||
999 | remove_inode_dquot_ref(inode, type, tofree_head); | 1002 | remove_inode_dquot_ref(inode, type, tofree_head); |
1003 | } | ||
1000 | } | 1004 | } |
1001 | spin_unlock(&inode_lock); | 1005 | spin_unlock(&inode_lock); |
1006 | #ifdef CONFIG_QUOTA_DEBUG | ||
1007 | if (reserved) { | ||
1008 | printk(KERN_WARNING "VFS (%s): Writes happened after quota" | ||
1009 | " was disabled thus quota information is probably " | ||
1010 | "inconsistent. Please run quotacheck(8).\n", sb->s_id); | ||
1011 | } | ||
1012 | #endif | ||
1002 | } | 1013 | } |
1003 | 1014 | ||
1004 | /* Gather all references from inodes and drop them */ | 1015 | /* Gather all references from inodes and drop them */ |