From: Jianchao Wang Date: Mon, 4 Jun 2018 09:03:55 +0000 (+0800) Subject: blk-mq: return when hctx is stopped in blk_mq_run_work_fn X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=0196d6b4088f43519576dc4b58ce28b6722dde3a;p=openwrt%2Fstaging%2Fblogic.git blk-mq: return when hctx is stopped in blk_mq_run_work_fn If a hardware queue is stopped, it should not be run again before explicitly started. Ignore stopped queues in blk_mq_run_work_fn(), fixing a regression recently introduced when the START_ON_RUN bit was removed. Fixes: 15fe8a90bb45 ("blk-mq: remove blk_mq_delay_queue()") Reviewed-by: Ming Lei Reviewed-by: Bart Van Assche Signed-off-by: Jianchao Wang Signed-off-by: Jens Axboe --- diff --git a/block/blk-mq.c b/block/blk-mq.c index 6332940ca118..d2de0a719ab8 100644 --- a/block/blk-mq.c +++ b/block/blk-mq.c @@ -1475,7 +1475,7 @@ static void blk_mq_run_work_fn(struct work_struct *work) * If we are stopped, don't run the queue. */ if (test_bit(BLK_MQ_S_STOPPED, &hctx->state)) - clear_bit(BLK_MQ_S_STOPPED, &hctx->state); + return; __blk_mq_run_hw_queue(hctx); }