diff options
author | Jinlong Chen <nickyc975@zju.edu.cn> | 2022-10-30 17:47:30 +0800 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2022-10-31 07:27:54 -0600 |
commit | 219cf43c552a49a7710b7b341bf616682a2643f0 (patch) | |
tree | 9cf3a60ad707fa48f7ee4009db1bcdd76135f216 /block/genhd.c | |
parent | adff215830fcf3ef74f2f0d4dd5a47a6927d450b (diff) | |
download | linux-riscv-219cf43c552a49a7710b7b341bf616682a2643f0.tar.gz linux-riscv-219cf43c552a49a7710b7b341bf616682a2643f0.tar.bz2 linux-riscv-219cf43c552a49a7710b7b341bf616682a2643f0.zip |
blk-mq: move queue_is_mq out of blk_mq_cancel_work_sync
The only caller that needs queue_is_mq check is del_gendisk, so move the
check into it.
Signed-off-by: Jinlong Chen <nickyc975@zju.edu.cn>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Link: https://lore.kernel.org/r/20221030094730.1275463-1-nickyc975@zju.edu.cn
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'block/genhd.c')
-rw-r--r-- | block/genhd.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/block/genhd.c b/block/genhd.c index 17b33c62423d..493b93faee9c 100644 --- a/block/genhd.c +++ b/block/genhd.c @@ -638,7 +638,9 @@ void del_gendisk(struct gendisk *disk) blk_sync_queue(q); blk_flush_integrity(); - blk_mq_cancel_work_sync(q); + + if (queue_is_mq(q)) + blk_mq_cancel_work_sync(q); blk_mq_quiesce_queue(q); if (q->elevator) { |