[PATCH] rxrpc: Fix smp_processor_id() usage
Sven Schnelle
svens at stackframe.org
Wed Apr 2 15:11:36 EDT 2008
Signed-off-by: Sven Schnelle <svens at stackframe.org>
---
net/rxrpc/ar-internal.h | 7 +++++--
1 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/net/rxrpc/ar-internal.h b/net/rxrpc/ar-internal.h
index 126ca77..5fe0696 100644
--- a/net/rxrpc/ar-internal.h
+++ b/net/rxrpc/ar-internal.h
@@ -610,8 +610,11 @@ extern struct rxrpc_transport *rxrpc_find_transport(struct rxrpc_local *,
*/
extern unsigned rxrpc_debug;
-#define dbgprintk(FMT,...) \
- printk("[%x%-6.6s] "FMT"\n", smp_processor_id(), current->comm ,##__VA_ARGS__)
+#define dbgprintk(FMT,...) do {\
+ preempt_disable(); \
+ printk("[%x%-6.6s] "FMT"\n", smp_processor_id(), current->comm ,##__VA_ARGS__); \
+ preempt_enable(); \
+} while(0)
/* make sure we maintain the format strings, even when debugging is disabled */
static inline __attribute__((format(printf,1,2)))
--
1.5.4.5
More information about the linux-afs
mailing list