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
@@ -695,7 +693,7 @@ void dqput(struct dquot *dquot)
695
693
696
694
if (!dquot )
697
695
return ;
698
- #ifdef __DQUOT_PARANOIA
696
+ #ifdef CONFIG_QUOTA_DEBUG
699
697
if (!atomic_read (& dquot -> dq_count )) {
700
698
printk ("VFS: dqput: trying to free free dquot\n" );
701
699
printk ("VFS: device %s, dquot of %s %d\n" ,
@@ -748,7 +746,7 @@ void dqput(struct dquot *dquot)
748
746
goto we_slept ;
749
747
}
750
748
atomic_dec (& dquot -> dq_count );
751
- #ifdef __DQUOT_PARANOIA
749
+ #ifdef CONFIG_QUOTA_DEBUG
752
750
/* sanity check */
753
751
BUG_ON (!list_empty (& dquot -> dq_free ));
754
752
#endif
@@ -845,7 +843,7 @@ struct dquot *dqget(struct super_block *sb, unsigned int id, int type)
845
843
dquot = NULL ;
846
844
goto out ;
847
845
}
848
- #ifdef __DQUOT_PARANOIA
846
+ #ifdef CONFIG_QUOTA_DEBUG
849
847
BUG_ON (!dquot -> dq_sb ); /* Has somebody invalidated entry under us? */
850
848
#endif
851
849
out :
@@ -874,15 +872,15 @@ static int dqinit_needed(struct inode *inode, int type)
874
872
static void add_dquot_ref (struct super_block * sb , int type )
875
873
{
876
874
struct inode * inode , * old_inode = NULL ;
877
- #ifdef __DQUOT_PARANOIA
875
+ #ifdef CONFIG_QUOTA_DEBUG
878
876
int reserved = 0 ;
879
877
#endif
880
878
881
879
spin_lock (& inode_lock );
882
880
list_for_each_entry (inode , & sb -> s_inodes , i_sb_list ) {
883
881
if (inode -> i_state & (I_FREEING |I_CLEAR |I_WILL_FREE |I_NEW ))
884
882
continue ;
885
- #ifdef __DQUOT_PARANOIA
883
+ #ifdef CONFIG_QUOTA_DEBUG
886
884
if (unlikely (inode_get_rsv_space (inode ) > 0 ))
887
885
reserved = 1 ;
888
886
#endif
@@ -907,7 +905,7 @@ static void add_dquot_ref(struct super_block *sb, int type)
907
905
spin_unlock (& inode_lock );
908
906
iput (old_inode );
909
907
910
- #ifdef __DQUOT_PARANOIA
908
+ #ifdef CONFIG_QUOTA_DEBUG
911
909
if (reserved ) {
912
910
printk (KERN_WARNING "VFS (%s): Writes happened before quota"
913
911
" was turned on thus quota information is probably "
@@ -940,7 +938,7 @@ static int remove_inode_dquot_ref(struct inode *inode, int type,
940
938
inode -> i_dquot [type ] = NULL ;
941
939
if (dquot ) {
942
940
if (dqput_blocks (dquot )) {
943
- #ifdef __DQUOT_PARANOIA
941
+ #ifdef CONFIG_QUOTA_DEBUG
944
942
if (atomic_read (& dquot -> dq_count ) != 1 )
945
943
printk (KERN_WARNING "VFS: Adding dquot with dq_count %d to dispose list.\n" , atomic_read (& dquot -> dq_count ));
946
944
#endif
0 commit comments