summaryrefslogtreecommitdiff
path: root/block/blktrace.c
diff options
context:
space:
mode:
authorIngo Molnar <mingo@elte.hu>2008-06-16 11:15:21 +0200
committerIngo Molnar <mingo@elte.hu>2008-06-16 11:15:21 +0200
commitf9e8e07e074a880e110922759dcdb369fecdf07c (patch)
tree61bc9a61e0a0546a81d699047d9e001c50b52d50 /block/blktrace.c
parente9886ca3a93d7d041d3de8e5acebe213da777d59 (diff)
parent066519068ad2fbe98c7f45552b1f592903a9c8c8 (diff)
Merge branch 'linus' into sched-develtip-sched-devel-2008-06-16_09.15_Mon
Diffstat (limited to 'block/blktrace.c')
-rw-r--r--block/blktrace.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/block/blktrace.c b/block/blktrace.c
index 7ae87cc4a163..8d3a27780260 100644
--- a/block/blktrace.c
+++ b/block/blktrace.c
@@ -79,16 +79,17 @@ void __trace_note_message(struct blk_trace *bt, const char *fmt, ...)
{
int n;
va_list args;
+ unsigned long flags;
char *buf;
- preempt_disable();
+ local_irq_save(flags);
buf = per_cpu_ptr(bt->msg_data, smp_processor_id());
va_start(args, fmt);
n = vscnprintf(buf, BLK_TN_MAX_MSG, fmt, args);
va_end(args);
trace_note(bt, 0, BLK_TN_MESSAGE, buf, n);
- preempt_enable();
+ local_irq_restore(flags);
}
EXPORT_SYMBOL_GPL(__trace_note_message);
@@ -158,10 +159,7 @@ void __blk_add_trace(struct blk_trace *bt, sector_t sector, int bytes,
/*
* A word about the locking here - we disable interrupts to reserve
* some space in the relay per-cpu buffer, to prevent an irq
- * from coming in and stepping on our toes. Once reserved, it's
- * enough to get preemption disabled to prevent read of this data
- * before we are through filling it. get_cpu()/put_cpu() does this
- * for us
+ * from coming in and stepping on our toes.
*/
local_irq_save(flags);