aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--kernel/trace/blktrace.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/kernel/trace/blktrace.c b/kernel/trace/blktrace.c
index 223b92e77b3..11e7c8d9d22 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,
bt->pid = buts->pid;
bt->trace_state = Blktrace_setup;
- if (atomic_add_return(1, &blk_probes_ref) == 1)
- blk_register_tracepoints();
-
ret = -EBUSY;
old_bt = xchg(&q->blk_trace, bt);
if (old_bt) {
@@ -478,6 +475,9 @@ int do_blk_trace_setup(struct request_queue *q, char *name, dev_t dev,
goto err;
}
+ if (atomic_add_return(1, &blk_probes_ref) == 1)
+ blk_register_tracepoints();
+
return 0;
err:
if (bt) {