Skip to content

Commit

Permalink
blk-mq: remove dead check from blk_mq_dispatch_rq_list
Browse files Browse the repository at this point in the history
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.

Signed-off-by: Ming Lei <[email protected]>
Tested-by: Baolin Wang <[email protected]>
Reviewed-by: Johannes Thumshirn <[email protected]>
Reviewed-by: Sagi Grimberg <[email protected]>
Reviewed-by: Christoph Hellwig <[email protected]>
Cc: Sagi Grimberg <[email protected]>
Cc: Baolin Wang <[email protected]>
Cc: Christoph Hellwig <[email protected]>
Signed-off-by: Jens Axboe <[email protected]>
  • Loading branch information
Ming Lei authored and axboe committed Jun 30, 2020
1 parent 7538352 commit bbdb3c5
Showing 1 changed file with 0 additions and 7 deletions.
7 changes: 0 additions & 7 deletions block/blk-mq.c
Original file line number Diff line number Diff line change
Expand Up @@ -1426,13 +1426,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;
}

Expand Down

0 comments on commit bbdb3c5

Please sign in to comment.