···3333 Note that this behavior is currently deprecated and may go away in3434 future. Please use notification via netlink socket instead.35353636+config QUOTA_DEBUG3737+ bool "Additional quota sanity checks"3838+ depends on QUOTA3939+ default n4040+ help4141+ If you say Y here, quota subsystem will perform some additional4242+ sanity checks of quota internal structures. If unsure, say N.4343+3644# Generic support for tree structured quota files. Selected when needed.3745config QUOTA_TREE3846 tristate
+7-9
fs/quota/dquot.c
···80808181#include <asm/uaccess.h>82828383-#define __DQUOT_PARANOIA8484-8583/*8684 * There are three quota SMP locks. dq_list_lock protects all lists with quotas8785 * and quota formats, dqstats structure containing statistics about the lists···693695694696 if (!dquot)695697 return;696696-#ifdef __DQUOT_PARANOIA698698+#ifdef CONFIG_QUOTA_DEBUG697699 if (!atomic_read(&dquot->dq_count)) {698700 printk("VFS: dqput: trying to free free dquot\n");699701 printk("VFS: device %s, dquot of %s %d\n",···746748 goto we_slept;747749 }748750 atomic_dec(&dquot->dq_count);749749-#ifdef __DQUOT_PARANOIA751751+#ifdef CONFIG_QUOTA_DEBUG750752 /* sanity check */751753 BUG_ON(!list_empty(&dquot->dq_free));752754#endif···843845 dquot = NULL;844846 goto out;845847 }846846-#ifdef __DQUOT_PARANOIA848848+#ifdef CONFIG_QUOTA_DEBUG847849 BUG_ON(!dquot->dq_sb); /* Has somebody invalidated entry under us? */848850#endif849851out:···872874static void add_dquot_ref(struct super_block *sb, int type)873875{874876 struct inode *inode, *old_inode = NULL;875875-#ifdef __DQUOT_PARANOIA877877+#ifdef CONFIG_QUOTA_DEBUG876878 int reserved = 0;877879#endif878880···880882 list_for_each_entry(inode, &sb->s_inodes, i_sb_list) {881883 if (inode->i_state & (I_FREEING|I_CLEAR|I_WILL_FREE|I_NEW))882884 continue;883883-#ifdef __DQUOT_PARANOIA885885+#ifdef CONFIG_QUOTA_DEBUG884886 if (unlikely(inode_get_rsv_space(inode) > 0))885887 reserved = 1;886888#endif···905907 spin_unlock(&inode_lock);906908 iput(old_inode);907909908908-#ifdef __DQUOT_PARANOIA910910+#ifdef CONFIG_QUOTA_DEBUG909911 if (reserved) {910912 printk(KERN_WARNING "VFS (%s): Writes happened before quota"911913 " was turned on thus quota information is probably "···938940 inode->i_dquot[type] = NULL;939941 if (dquot) {940942 if (dqput_blocks(dquot)) {941941-#ifdef __DQUOT_PARANOIA943943+#ifdef CONFIG_QUOTA_DEBUG942944 if (atomic_read(&dquot->dq_count) != 1)943945 printk(KERN_WARNING "VFS: Adding dquot with dq_count %d to dispose list.\n", atomic_read(&dquot->dq_count));944946#endif