public inbox for linux-block@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] blk-mq: remove unused code exist in blk_mq_dispatch_rq_list
@ 2020-07-17  9:23 yangerkun
  2020-07-17 10:03 ` Ming Lei
  2020-07-17 13:26 ` Jens Axboe
  0 siblings, 2 replies; 3+ messages in thread
From: yangerkun @ 2020-07-17  9:23 UTC (permalink / raw)
  To: axboe, ming.lei, linux-block; +Cc: yangerkun

Once .queue_rq return BLK_STS_RESOURCE or BLK_STS_DEV_RESOURCE, we will
insert the rq back to list, and will return false since '(!list_empty)'
always be true. The latter check seems unused.

Signed-off-by: yangerkun <yangerkun@huawei.com>
---
 block/blk-mq.c | 7 -------
 1 file changed, 7 deletions(-)

diff --git a/block/blk-mq.c b/block/blk-mq.c
index 4e0d173beaa3..5e561283580f 100644
--- a/block/blk-mq.c
+++ b/block/blk-mq.c
@@ -1361,13 +1361,6 @@ bool blk_mq_dispatch_rq_list(struct request_queue *q, struct list_head *list,
 	} else
 		blk_mq_update_dispatch_busy(hctx, false);
 
-	/*
-	 * If the host/device is unable to accept more work, inform the
-	 * caller of that.
-	 */
-	if (ret == BLK_STS_RESOURCE || ret == BLK_STS_DEV_RESOURCE)
-		return false;
-
 	return (queued + errors) != 0;
 }
 
-- 
2.25.4


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2020-07-17 13:26 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-07-17  9:23 [PATCH] blk-mq: remove unused code exist in blk_mq_dispatch_rq_list yangerkun
2020-07-17 10:03 ` Ming Lei
2020-07-17 13:26 ` Jens Axboe

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox