diff options
Diffstat (limited to 'include/linux/sunrpc/debug.h')
-rw-r--r-- | include/linux/sunrpc/debug.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/include/linux/sunrpc/debug.h b/include/linux/sunrpc/debug.h index b506936f4ce6..6cb2517bcf75 100644 --- a/include/linux/sunrpc/debug.h +++ b/include/linux/sunrpc/debug.h | |||
@@ -50,19 +50,32 @@ extern unsigned int nlm_debug; | |||
50 | #endif | 50 | #endif |
51 | 51 | ||
52 | #define dprintk(args...) dfprintk(FACILITY, ## args) | 52 | #define dprintk(args...) dfprintk(FACILITY, ## args) |
53 | #define dprintk_rcu(args...) dfprintk_rcu(FACILITY, ## args) | ||
53 | 54 | ||
54 | #undef ifdebug | 55 | #undef ifdebug |
55 | #ifdef RPC_DEBUG | 56 | #ifdef RPC_DEBUG |
56 | # define ifdebug(fac) if (unlikely(rpc_debug & RPCDBG_##fac)) | 57 | # define ifdebug(fac) if (unlikely(rpc_debug & RPCDBG_##fac)) |
58 | |||
57 | # define dfprintk(fac, args...) \ | 59 | # define dfprintk(fac, args...) \ |
58 | do { \ | 60 | do { \ |
59 | ifdebug(fac) \ | 61 | ifdebug(fac) \ |
60 | printk(KERN_DEFAULT args); \ | 62 | printk(KERN_DEFAULT args); \ |
61 | } while (0) | 63 | } while (0) |
64 | |||
65 | # define dfprintk_rcu(fac, args...) \ | ||
66 | do { \ | ||
67 | ifdebug(fac) { \ | ||
68 | rcu_read_lock(); \ | ||
69 | printk(KERN_DEFAULT args); \ | ||
70 | rcu_read_unlock(); \ | ||
71 | } \ | ||
72 | } while (0) | ||
73 | |||
62 | # define RPC_IFDEBUG(x) x | 74 | # define RPC_IFDEBUG(x) x |
63 | #else | 75 | #else |
64 | # define ifdebug(fac) if (0) | 76 | # define ifdebug(fac) if (0) |
65 | # define dfprintk(fac, args...) do ; while (0) | 77 | # define dfprintk(fac, args...) do ; while (0) |
78 | # define dfprintk_rcu(fac, args...) do ; while (0) | ||
66 | # define RPC_IFDEBUG(x) | 79 | # define RPC_IFDEBUG(x) |
67 | #endif | 80 | #endif |
68 | 81 | ||