mirror of
https://github.com/lkl/linux.git
synced 2025-12-19 08:03:01 +09:00
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>
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user