[PATCH] afs: Fix smp_processor_id() usage
Sven Schnelle
svens at stackframe.org
Wed Apr 2 15:11:35 EDT 2008
Signed-off-by: Sven Schnelle <svens at stackframe.org>
---
fs/afs/internal.h | 7 +++++--
1 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/fs/afs/internal.h b/fs/afs/internal.h
index 9ba16ed..f645a18 100644
--- a/fs/afs/internal.h
+++ b/fs/afs/internal.h
@@ -748,8 +748,11 @@ extern int afs_fsync(struct file *, struct dentry *, int);
*/
extern unsigned afs_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