[PATCH] simplify shmem_aops.set_page_dirty() method
[sfrench/cifs-2.6.git] / include / linux / debug_locks.h
index 6a7047851e48b8174ffa0360e95e056a5d9921fa..1678a5de7013a91f08f3f352a773ff90166240f1 100644 (file)
@@ -1,6 +1,8 @@
 #ifndef __LINUX_DEBUG_LOCKING_H
 #define __LINUX_DEBUG_LOCKING_H
 
+struct task_struct;
+
 extern int debug_locks;
 extern int debug_locks_silent;
 
@@ -22,7 +24,7 @@ extern int debug_locks_off(void);
        int __ret = 0;                                                  \
                                                                        \
        if (unlikely(c)) {                                              \
-               if (debug_locks_off())                                  \
+               if (debug_locks_off() && !debug_locks_silent)           \
                        WARN_ON(1);                                     \
                __ret = 1;                                              \
        }                                                               \
@@ -41,6 +43,8 @@ extern int debug_locks_off(void);
 # define locking_selftest()    do { } while (0)
 #endif
 
+struct task_struct;
+
 #ifdef CONFIG_LOCKDEP
 extern void debug_show_all_locks(void);
 extern void debug_show_held_locks(struct task_struct *task);