diff options
Diffstat (limited to 'kernel')
-rw-r--r-- | kernel/trace/blktrace.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/kernel/trace/blktrace.c b/kernel/trace/blktrace.c index 223b92e77b3f..11e7c8d9d222 100644 --- a/kernel/trace/blktrace.c +++ b/kernel/trace/blktrace.c | |||
@@ -468,9 +468,6 @@ int do_blk_trace_setup(struct request_queue *q, char *name, dev_t dev, | |||
468 | bt->pid = buts->pid; | 468 | bt->pid = buts->pid; |
469 | bt->trace_state = Blktrace_setup; | 469 | bt->trace_state = Blktrace_setup; |
470 | 470 | ||
471 | if (atomic_add_return(1, &blk_probes_ref) == 1) | ||
472 | blk_register_tracepoints(); | ||
473 | |||
474 | ret = -EBUSY; | 471 | ret = -EBUSY; |
475 | old_bt = xchg(&q->blk_trace, bt); | 472 | old_bt = xchg(&q->blk_trace, bt); |
476 | if (old_bt) { | 473 | if (old_bt) { |
@@ -478,6 +475,9 @@ int do_blk_trace_setup(struct request_queue *q, char *name, dev_t dev, | |||
478 | goto err; | 475 | goto err; |
479 | } | 476 | } |
480 | 477 | ||
478 | if (atomic_add_return(1, &blk_probes_ref) == 1) | ||
479 | blk_register_tracepoints(); | ||
480 | |||
481 | return 0; | 481 | return 0; |
482 | err: | 482 | err: |
483 | if (bt) { | 483 | if (bt) { |