[PATCH 1/4] block: return status code in blk_mq_end_request()

Hannes Reinecke
2020-09-30T08:03:05Z

blk_mq_end_request() will use the block status returned from
queue_rq() as argument, except in one instance in blk_mq_dispatch_rq_list(),
where the generic BLK_STS_IOERR is used.

Signed-off-by: Hannes Reinecke <hare@suse.de>
---
block/blk-mq.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/block/blk-mq.c b/block/blk-mq.c
index 0015a1892153..a19dda3a4ad0 100644
--- a/block/blk-mq.c
+++ b/block/blk-mq.c
@@ -1403,7 +1403,7 @@ bool blk_mq_dispatch_rq_list(struct blk_mq_hw_ctx *hctx, struct list_head *list,
break;
default:
errors++;
- blk_mq_end_request(rq, BLK_STS_IOERR);
+ blk_mq_end_request(rq, ret);
}
} while (!list_empty(list));
out:
--
2.16.4