Message ID | 20221026075631.682100-1-yebin@huaweicloud.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | blktrace:use '__blk_trace_remove' helper in 'blk_trace_remove_queue' | expand |
diff --git a/kernel/trace/blktrace.c b/kernel/trace/blktrace.c index a995ea1ef849..115ae18e479d 100644 --- a/kernel/trace/blktrace.c +++ b/kernel/trace/blktrace.c @@ -1609,19 +1609,7 @@ device_initcall(init_blk_tracer); static int blk_trace_remove_queue(struct request_queue *q) { - struct blk_trace *bt; - - bt = rcu_replace_pointer(q->blk_trace, NULL, - lockdep_is_held(&q->debugfs_mutex)); - if (bt == NULL) - return -EINVAL; - - blk_trace_stop(bt); - - put_probe_ref(); - synchronize_rcu(); - blk_trace_free(q, bt); - return 0; + return __blk_trace_remove(q); } /*