From: Yufen Yu Date: Fri, 9 Oct 2020 03:26:30 +0000 (-0400) Subject: blk-mq: use helper function to test hw stopped X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=0841031ab9a8fb2551880c24a8419997b8e834bc;p=linux.git 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 Signed-off-by: Jens Axboe --- diff --git a/block/blk-mq.c b/block/blk-mq.c index c5fefd39d0c04..e11ee801ba191 100644 --- a/block/blk-mq.c +++ b/block/blk-mq.c @@ -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);