summaryrefslogtreecommitdiffstats
path: root/block/blk-mq.c
diff options
context:
space:
mode:
authorJinlong Chen <nickyc975@zju.edu.cn>2022-10-30 10:47:30 +0100
committerJens Axboe <axboe@kernel.dk>2022-10-31 14:27:54 +0100
commit219cf43c552a49a7710b7b341bf616682a2643f0 (patch)
tree9cf3a60ad707fa48f7ee4009db1bcdd76135f216 /block/blk-mq.c
parentblock: simplify blksize_bits() implementation (diff)
downloadlinux-219cf43c552a49a7710b7b341bf616682a2643f0.tar.xz
linux-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/blk-mq.c')
-rw-r--r--block/blk-mq.c12
1 files changed, 5 insertions, 7 deletions
diff --git a/block/blk-mq.c b/block/blk-mq.c
index 060c8cca4b24..bcb402f9bff6 100644
--- a/block/blk-mq.c
+++ b/block/blk-mq.c
@@ -4883,15 +4883,13 @@ EXPORT_SYMBOL(blk_mq_rq_cpu);
void blk_mq_cancel_work_sync(struct request_queue *q)
{
- if (queue_is_mq(q)) {
- struct blk_mq_hw_ctx *hctx;
- unsigned long i;
+ struct blk_mq_hw_ctx *hctx;
+ unsigned long i;
- cancel_delayed_work_sync(&q->requeue_work);
+ cancel_delayed_work_sync(&q->requeue_work);
- queue_for_each_hw_ctx(q, hctx, i)
- cancel_delayed_work_sync(&hctx->run_work);
- }
+ queue_for_each_hw_ctx(q, hctx, i)
+ cancel_delayed_work_sync(&hctx->run_work);
}
static int __init blk_mq_init(void)