Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 98028
b: refs/heads/master
c: 14a73f5
h: refs/heads/master
v: v3
  • Loading branch information
Carl Henrik Lunde authored and Linus Torvalds committed Jun 12, 2008
1 parent e7755f6 commit 0f0b088
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 95dcf8350dc889e735d03c0debe2f7b26d243185
refs/heads/master: 14a73f54798f39854e521fb596da7d50b7566bbd
10 changes: 4 additions & 6 deletions trunk/block/blktrace.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down Expand Up @@ -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);

Expand Down

0 comments on commit 0f0b088

Please sign in to comment.