Skip to content

Commit

Permalink
blktrace: remove unnessary stop block trace in 'blk_trace_shutdown'
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Ye Bin authored and Jens Axboe committed Oct 20, 2022
1 parent dcd1a59 commit 2db9621
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions kernel/trace/blktrace.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 2db9621

Please sign in to comment.