Skip to contentSkip to conversation

blk-mq: remove unneeded needs_restart check

PATCH Applied Miaohe Lin 2 participants 2 messages Sep 5, 2022 Block layer

lore
Share & tools
lore

Miaohe Lin

author
#0 lore raw

PATCH 1/1 blk-mq: remove unneeded needs_restart check

If code reaches here, needs_restart must be true. Remove this unneeded needs_restart check. No functional change intended.

---
 block/blk-mq.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
block/blk-mq.c +1 -1
index b9f6989cb5bd..be7de99622a2 100644
@@ -1992,7 +1992,7 @@ bool blk_mq_dispatch_rq_list(struct blk_mq_hw_ctx *hctx, struct list_head *list,
 		if (!needs_restart ||
 		    (no_tag && list_empty_careful(&hctx->dispatch_wait.entry)))
 			blk_mq_run_hw_queue(hctx, true);
-		else if (needs_restart && needs_resource)
+		else if (needs_resource)
 			blk_mq_delay_run_hw_queue(hctx, BLK_MQ_RESOURCE_DELAY);
 
 		blk_mq_update_dispatch_busy(hctx, true);
Signature · 1 line
2.23.0
maintainer Applied
#1 lore raw
Quoted 4 lines · Miaohe Lin

If code reaches here, needs_restart must be true. Remove this unneeded needs_restart check. No functional change intended.

Applied, thanks!

[1/1] blk-mq: remove unneeded needs_restart check

      commit: 6d5e8d21e8997b0efa409e46db22a27b5cbba6aa

Best regards,

Signature · 1 line
Jens Axboe