blk-mq: use helper function to test hw stopped

We have introduced helper function blk_mq_hctx_stopped() to test
BLK_MQ_S_STOPPED.

Signed-off-by: Yufen Yu <yuyufen@huawei.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
This commit is contained in:
Yufen Yu
2020-10-08 23:26:30 -04:00
committed by Jens Axboe
parent 75e6c00fc7
commit 0841031ab9
+1 -1
View File
@@ -1807,7 +1807,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))
if (blk_mq_hctx_stopped(hctx))
return;
__blk_mq_run_hw_queue(hctx);