blk-mq: move the blk_mq_hctx_stopped check in __blk_mq_delay_run_hw_queue
authorChristoph Hellwig <hch@lst.de>
Thu, 13 Apr 2023 06:06:49 +0000 (08:06 +0200)
committerJens Axboe <axboe@kernel.dk>
Thu, 13 Apr 2023 12:57:18 +0000 (06:57 -0600)
commitcd735e11130d4c84a073e1056aa019ca0f3305f9
treea52ca4eee82889ccc48a275432b5caf75b2d5ea2
parentc20a1a2c1a9f5b1081121cd18be444e7610b0c6f
blk-mq: move the blk_mq_hctx_stopped check in __blk_mq_delay_run_hw_queue

For the in-context dispatch, blk_mq_hctx_stopped is alredy checked in
blk_mq_sched_dispatch_requests under blk_mq_run_dispatch_ops() protection.
For the async dispatch case having a check before scheduling the work
still makes sense to avoid needless workqueue scheduling, so just keep it
for that case.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Damien Le Moal <dlemoal@kernel.org>
Link: https://lore.kernel.org/r/20230413060651.694656-4-hch@lst.de
Signed-off-by: Jens Axboe <axboe@kernel.dk>
block/blk-mq.c