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