Merge branch 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs-2.6

* 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs-2.6:
quota: Convert __DQUOT_PARANOIA symbol to standard config option

+15 -9
+8
fs/quota/Kconfig
··· 33 Note that this behavior is currently deprecated and may go away in 34 future. Please use notification via netlink socket instead. 35 36 # Generic support for tree structured quota files. Selected when needed. 37 config QUOTA_TREE 38 tristate
··· 33 Note that this behavior is currently deprecated and may go away in 34 future. Please use notification via netlink socket instead. 35 36 + config QUOTA_DEBUG 37 + bool "Additional quota sanity checks" 38 + depends on QUOTA 39 + default n 40 + help 41 + If you say Y here, quota subsystem will perform some additional 42 + sanity checks of quota internal structures. If unsure, say N. 43 + 44 # Generic support for tree structured quota files. Selected when needed. 45 config QUOTA_TREE 46 tristate
+7 -9
fs/quota/dquot.c
··· 80 81 #include <asm/uaccess.h> 82 83 - #define __DQUOT_PARANOIA 84 - 85 /* 86 * There are three quota SMP locks. dq_list_lock protects all lists with quotas 87 * and quota formats, dqstats structure containing statistics about the lists ··· 693 694 if (!dquot) 695 return; 696 - #ifdef __DQUOT_PARANOIA 697 if (!atomic_read(&dquot->dq_count)) { 698 printk("VFS: dqput: trying to free free dquot\n"); 699 printk("VFS: device %s, dquot of %s %d\n", ··· 746 goto we_slept; 747 } 748 atomic_dec(&dquot->dq_count); 749 - #ifdef __DQUOT_PARANOIA 750 /* sanity check */ 751 BUG_ON(!list_empty(&dquot->dq_free)); 752 #endif ··· 843 dquot = NULL; 844 goto out; 845 } 846 - #ifdef __DQUOT_PARANOIA 847 BUG_ON(!dquot->dq_sb); /* Has somebody invalidated entry under us? */ 848 #endif 849 out: ··· 872 static void add_dquot_ref(struct super_block *sb, int type) 873 { 874 struct inode *inode, *old_inode = NULL; 875 - #ifdef __DQUOT_PARANOIA 876 int reserved = 0; 877 #endif 878 ··· 880 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)) 882 continue; 883 - #ifdef __DQUOT_PARANOIA 884 if (unlikely(inode_get_rsv_space(inode) > 0)) 885 reserved = 1; 886 #endif ··· 905 spin_unlock(&inode_lock); 906 iput(old_inode); 907 908 - #ifdef __DQUOT_PARANOIA 909 if (reserved) { 910 printk(KERN_WARNING "VFS (%s): Writes happened before quota" 911 " was turned on thus quota information is probably " ··· 938 inode->i_dquot[type] = NULL; 939 if (dquot) { 940 if (dqput_blocks(dquot)) { 941 - #ifdef __DQUOT_PARANOIA 942 if (atomic_read(&dquot->dq_count) != 1) 943 printk(KERN_WARNING "VFS: Adding dquot with dq_count %d to dispose list.\n", atomic_read(&dquot->dq_count)); 944 #endif
··· 80 81 #include <asm/uaccess.h> 82 83 /* 84 * There are three quota SMP locks. dq_list_lock protects all lists with quotas 85 * and quota formats, dqstats structure containing statistics about the lists ··· 695 696 if (!dquot) 697 return; 698 + #ifdef CONFIG_QUOTA_DEBUG 699 if (!atomic_read(&dquot->dq_count)) { 700 printk("VFS: dqput: trying to free free dquot\n"); 701 printk("VFS: device %s, dquot of %s %d\n", ··· 748 goto we_slept; 749 } 750 atomic_dec(&dquot->dq_count); 751 + #ifdef CONFIG_QUOTA_DEBUG 752 /* sanity check */ 753 BUG_ON(!list_empty(&dquot->dq_free)); 754 #endif ··· 845 dquot = NULL; 846 goto out; 847 } 848 + #ifdef CONFIG_QUOTA_DEBUG 849 BUG_ON(!dquot->dq_sb); /* Has somebody invalidated entry under us? */ 850 #endif 851 out: ··· 874 static void add_dquot_ref(struct super_block *sb, int type) 875 { 876 struct inode *inode, *old_inode = NULL; 877 + #ifdef CONFIG_QUOTA_DEBUG 878 int reserved = 0; 879 #endif 880 ··· 882 list_for_each_entry(inode, &sb->s_inodes, i_sb_list) { 883 if (inode->i_state & (I_FREEING|I_CLEAR|I_WILL_FREE|I_NEW)) 884 continue; 885 + #ifdef CONFIG_QUOTA_DEBUG 886 if (unlikely(inode_get_rsv_space(inode) > 0)) 887 reserved = 1; 888 #endif ··· 907 spin_unlock(&inode_lock); 908 iput(old_inode); 909 910 + #ifdef CONFIG_QUOTA_DEBUG 911 if (reserved) { 912 printk(KERN_WARNING "VFS (%s): Writes happened before quota" 913 " was turned on thus quota information is probably " ··· 940 inode->i_dquot[type] = NULL; 941 if (dquot) { 942 if (dqput_blocks(dquot)) { 943 + #ifdef CONFIG_QUOTA_DEBUG 944 if (atomic_read(&dquot->dq_count) != 1) 945 printk(KERN_WARNING "VFS: Adding dquot with dq_count %d to dispose list.\n", atomic_read(&dquot->dq_count)); 946 #endif