[<prev] [next>] [day] [month] [year] [list]
Message-ID: <20200905094233.3888-1-linmiaohe@huawei.com>
Date: Sat, 5 Sep 2020 05:42:33 -0400
From: Miaohe Lin <linmiaohe@...wei.com>
To: <axboe@...nel.dk>
CC: <linux-block@...r.kernel.org>, <linux-kernel@...r.kernel.org>,
<linmiaohe@...wei.com>
Subject: [PATCH] block: Use helper function blk_mq_sched_needs_restart()
Use helper function blk_mq_sched_needs_restart() to check if hardware queue
needs restart.
Signed-off-by: Miaohe Lin <linmiaohe@...wei.com>
---
block/blk-mq-sched.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/block/blk-mq-sched.c b/block/blk-mq-sched.c
index d2790e5b06d1..dc837fd26e17 100644
--- a/block/blk-mq-sched.c
+++ b/block/blk-mq-sched.c
@@ -65,7 +65,7 @@ void blk_mq_sched_assign_ioc(struct request *rq)
*/
void blk_mq_sched_mark_restart_hctx(struct blk_mq_hw_ctx *hctx)
{
- if (test_bit(BLK_MQ_S_SCHED_RESTART, &hctx->state))
+ if (blk_mq_sched_needs_restart(hctx))
return;
set_bit(BLK_MQ_S_SCHED_RESTART, &hctx->state);
@@ -74,7 +74,7 @@ EXPORT_SYMBOL_GPL(blk_mq_sched_mark_restart_hctx);
void blk_mq_sched_restart(struct blk_mq_hw_ctx *hctx)
{
- if (!test_bit(BLK_MQ_S_SCHED_RESTART, &hctx->state))
+ if (!blk_mq_sched_needs_restart(hctx))
return;
clear_bit(BLK_MQ_S_SCHED_RESTART, &hctx->state);
--
2.19.1
Powered by blists - more mailing lists