blk-mq: remove the blk_mq_hctx_stopped check in blk_mq_run_work_fn
authorChristoph Hellwig <hch@lst.de>
Thu, 13 Apr 2023 06:06:48 +0000 (08:06 +0200)
committerJens Axboe <axboe@kernel.dk>
Thu, 13 Apr 2023 12:57:18 +0000 (06:57 -0600)
blk_mq_hctx_stopped is already checked in blk_mq_sched_dispatch_requests
under blk_mq_run_dispatch_ops() protection, so remove the duplicate check.

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

index 1e35c829bdddfe5ccfbefc89cb60de4e3a0e08f8..ad13d2aa948b3a59159feac031c15c49a254ffcd 100644 (file)
@@ -2441,15 +2441,8 @@ EXPORT_SYMBOL(blk_mq_start_stopped_hw_queues);
 
 static void blk_mq_run_work_fn(struct work_struct *work)
 {
-       struct blk_mq_hw_ctx *hctx;
-
-       hctx = container_of(work, struct blk_mq_hw_ctx, run_work.work);
-
-       /*
-        * If we are stopped, don't run the queue.
-        */
-       if (blk_mq_hctx_stopped(hctx))
-               return;
+       struct blk_mq_hw_ctx *hctx =
+               container_of(work, struct blk_mq_hw_ctx, run_work.work);
 
        __blk_mq_run_hw_queue(hctx);
 }