diff mbox series

[7/9] blk-mq: remove dead check from blk_mq_dispatch_rq_list

Message ID 20200513095443.2038859-8-ming.lei@redhat.com (mailing list archive)
State New, archived
Headers show
Series blk-mq: support batching dispatch from scheduler | expand

Commit Message

Ming Lei May 13, 2020, 9:54 a.m. UTC
When BLK_STS_RESOURCE or BLK_STS_DEV_RESOURCE is returned from
.queue_rq, the 'list' variable always holds this rq which isn't
queued to LLD successfully.

So blk_mq_dispatch_rq_list() always returns false from the branch
of '!list_empty(list)'.

No functional change.

Cc: Sagi Grimberg <sagi@grimberg.me>
Cc: Baolin Wang <baolin.wang7@gmail.com>
Cc: Christoph Hellwig <hch@infradead.org>
Signed-off-by: Ming Lei <ming.lei@redhat.com>
---
 block/blk-mq.c | 7 -------
 1 file changed, 7 deletions(-)

Comments

Christoph Hellwig May 13, 2020, 12:57 p.m. UTC | #1
On Wed, May 13, 2020 at 05:54:41PM +0800, Ming Lei wrote:
> When BLK_STS_RESOURCE or BLK_STS_DEV_RESOURCE is returned from
> .queue_rq, the 'list' variable always holds this rq which isn't
> queued to LLD successfully.
> 
> So blk_mq_dispatch_rq_list() always returns false from the branch
> of '!list_empty(list)'.

Looks good,

Reviewed-by: Christoph Hellwig <hch@lst.de>
Sagi Grimberg May 13, 2020, 11:24 p.m. UTC | #2
Reviewed-by: Sagi Grimberg <sagi@grimberg.me>
diff mbox series

Patch

diff --git a/block/blk-mq.c b/block/blk-mq.c
index 86beb8c66868..3e3fbb13f3b9 100644
--- a/block/blk-mq.c
+++ b/block/blk-mq.c
@@ -1366,13 +1366,6 @@  bool blk_mq_dispatch_rq_list(struct blk_mq_hw_ctx *hctx, 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;
 }