diff options
author | Jinlong Chen <nickyc975@zju.edu.cn> | 2022-10-30 09:32:12 +0100 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2022-10-31 14:30:42 +0100 |
commit | 56c1ee92246a5099a626b955dd7f6636cdce6f93 (patch) | |
tree | a293811c07e00db22d93b5510d38a0b1f5673ddf /block/blk-mq.c | |
parent | blk-mq: move queue_is_mq out of blk_mq_cancel_work_sync (diff) | |
download | linux-56c1ee92246a5099a626b955dd7f6636cdce6f93.tar.xz linux-56c1ee92246a5099a626b955dd7f6636cdce6f93.zip |
blk-mq: remove redundant call to blk_freeze_queue_start in blk_mq_destroy_queue
The calling relationship in blk_mq_destroy_queue() is as follows:
blk_mq_destroy_queue()
...
-> blk_queue_start_drain()
-> blk_freeze_queue_start() <- called
...
-> blk_freeze_queue()
-> blk_freeze_queue_start() <- called again
-> blk_mq_freeze_queue_wait()
...
So there is a redundant call to blk_freeze_queue_start().
Replace blk_freeze_queue() with blk_mq_freeze_queue_wait() to avoid the
redundant call.
Signed-off-by: Jinlong Chen <nickyc975@zju.edu.cn>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Link: https://lore.kernel.org/r/20221030083212.1251255-1-nickyc975@zju.edu.cn
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'block/blk-mq.c')
-rw-r--r-- | block/blk-mq.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/block/blk-mq.c b/block/blk-mq.c index bcb402f9bff6..623e8a506539 100644 --- a/block/blk-mq.c +++ b/block/blk-mq.c @@ -4037,7 +4037,7 @@ void blk_mq_destroy_queue(struct request_queue *q) blk_queue_flag_set(QUEUE_FLAG_DYING, q); blk_queue_start_drain(q); - blk_freeze_queue(q); + blk_mq_freeze_queue_wait(q); blk_sync_queue(q); blk_mq_cancel_work_sync(q); |