diff options
author | Ye Bin <yebin10@huawei.com> | 2022-10-19 05:36:02 +0200 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2022-10-20 15:02:52 +0200 |
commit | 2db96217e7e515071726ca4ec791742c4202a1b2 (patch) | |
tree | 6794f4fbfafbefa6b2ddf6dbc6de0d6d36aa8465 /kernel/trace/blktrace.c | |
parent | blktrace: fix possible memleak in '__blk_trace_remove' (diff) | |
download | linux-2db96217e7e515071726ca4ec791742c4202a1b2.tar.xz linux-2db96217e7e515071726ca4ec791742c4202a1b2.zip |
blktrace: remove unnessary stop block trace in 'blk_trace_shutdown'
As previous commit, 'blk_trace_cleanup' will stop block trace if
block trace's state is 'Blktrace_running'.
So remove unnessary stop block trace in 'blk_trace_shutdown'.
Signed-off-by: Ye Bin <yebin10@huawei.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Link: https://lore.kernel.org/r/20221019033602.752383-4-yebin@huaweicloud.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'kernel/trace/blktrace.c')
-rw-r--r-- | kernel/trace/blktrace.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/kernel/trace/blktrace.c b/kernel/trace/blktrace.c index e17bba027a2c..a995ea1ef849 100644 --- a/kernel/trace/blktrace.c +++ b/kernel/trace/blktrace.c @@ -776,10 +776,8 @@ int blk_trace_ioctl(struct block_device *bdev, unsigned cmd, char __user *arg) void blk_trace_shutdown(struct request_queue *q) { if (rcu_dereference_protected(q->blk_trace, - lockdep_is_held(&q->debugfs_mutex))) { - __blk_trace_startstop(q, 0); + lockdep_is_held(&q->debugfs_mutex))) __blk_trace_remove(q); - } } #ifdef CONFIG_BLK_CGROUP |