···33 Note that this behavior is currently deprecated and may go away in34 future. Please use notification via netlink socket instead.350000000036# Generic support for tree structured quota files. Selected when needed.37config QUOTA_TREE38 tristate
···33 Note that this behavior is currently deprecated and may go away in34 future. Please use notification via netlink socket instead.3536+config QUOTA_DEBUG37+ bool "Additional quota sanity checks"38+ depends on QUOTA39+ default n40+ help41+ If you say Y here, quota subsystem will perform some additional42+ sanity checks of quota internal structures. If unsure, say N.43+44# Generic support for tree structured quota files. Selected when needed.45config QUOTA_TREE46 tristate
+7-9
fs/quota/dquot.c
···8081#include <asm/uaccess.h>8283-#define __DQUOT_PARANOIA84-85/*86 * There are three quota SMP locks. dq_list_lock protects all lists with quotas87 * and quota formats, dqstats structure containing statistics about the lists···693694 if (!dquot)695 return;696-#ifdef __DQUOT_PARANOIA697 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_PARANOIA750 /* sanity check */751 BUG_ON(!list_empty(&dquot->dq_free));752#endif···843 dquot = NULL;844 goto out;845 }846-#ifdef __DQUOT_PARANOIA847 BUG_ON(!dquot->dq_sb); /* Has somebody invalidated entry under us? */848#endif849out:···872static void add_dquot_ref(struct super_block *sb, int type)873{874 struct inode *inode, *old_inode = NULL;875-#ifdef __DQUOT_PARANOIA876 int reserved = 0;877#endif878···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_PARANOIA884 if (unlikely(inode_get_rsv_space(inode) > 0))885 reserved = 1;886#endif···905 spin_unlock(&inode_lock);906 iput(old_inode);907908-#ifdef __DQUOT_PARANOIA909 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_PARANOIA942 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
···8081#include <asm/uaccess.h>820083/*84 * There are three quota SMP locks. dq_list_lock protects all lists with quotas85 * and quota formats, dqstats structure containing statistics about the lists···695696 if (!dquot)697 return;698+#ifdef CONFIG_QUOTA_DEBUG699 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_DEBUG752 /* sanity check */753 BUG_ON(!list_empty(&dquot->dq_free));754#endif···845 dquot = NULL;846 goto out;847 }848+#ifdef CONFIG_QUOTA_DEBUG849 BUG_ON(!dquot->dq_sb); /* Has somebody invalidated entry under us? */850#endif851out:···874static void add_dquot_ref(struct super_block *sb, int type)875{876 struct inode *inode, *old_inode = NULL;877+#ifdef CONFIG_QUOTA_DEBUG878 int reserved = 0;879#endif880···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_DEBUG886 if (unlikely(inode_get_rsv_space(inode) > 0))887 reserved = 1;888#endif···907 spin_unlock(&inode_lock);908 iput(old_inode);909910+#ifdef CONFIG_QUOTA_DEBUG911 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_DEBUG944 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