diff options
| author | Jianchao Wang <jianchao.w.wang@oracle.com> | 2018-06-04 05:03:55 -0400 |
|---|---|---|
| committer | Jens Axboe <axboe@kernel.dk> | 2018-06-04 14:10:40 -0400 |
| commit | 0196d6b4088f43519576dc4b58ce28b6722dde3a (patch) | |
| tree | 23d9263ad6148a5967e4710a3a228861c6392067 | |
| parent | f956d08a56732c61a4d44e8034eeeedfc06fe721 (diff) | |
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 <ming.lei@redhat.com>
Reviewed-by: Bart Van Assche <bart.vanassche@wdc.com>
Signed-off-by: Jianchao Wang <jianchao.w.wang@oracle.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
| -rw-r--r-- | block/blk-mq.c | 2 |
1 files changed, 1 insertions, 1 deletions
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) | |||
| 1475 | * If we are stopped, don't run the queue. | 1475 | * If we are stopped, don't run the queue. |
| 1476 | */ | 1476 | */ |
| 1477 | if (test_bit(BLK_MQ_S_STOPPED, &hctx->state)) | 1477 | if (test_bit(BLK_MQ_S_STOPPED, &hctx->state)) |
| 1478 | clear_bit(BLK_MQ_S_STOPPED, &hctx->state); | 1478 | return; |
| 1479 | 1479 | ||
| 1480 | __blk_mq_run_hw_queue(hctx); | 1480 | __blk_mq_run_hw_queue(hctx); |
| 1481 | } | 1481 | } |
