@@ -1286,8 +1286,10 @@ static blk_qc_t blk_mq_make_request(struct request_queue *q, struct bio *bio)
return BLK_QC_T_NONE;
rq = blk_mq_map_request(q, bio, &data);
- if (unlikely(!rq))
+ if (unlikely(!rq)) {
+ bio_io_error(bio);
return BLK_QC_T_NONE;
+ }
cookie = blk_tag_to_qc_t(rq->tag, data.hctx->queue_num);
@@ -1381,8 +1383,10 @@ static blk_qc_t blk_sq_make_request(struct request_queue *q, struct bio *bio)
request_count = blk_plug_queued_count(q);
rq = blk_mq_map_request(q, bio, &data);
- if (unlikely(!rq))
+ if (unlikely(!rq)) {
+ bio_io_error(bio);
return BLK_QC_T_NONE;
+ }
cookie = blk_tag_to_qc_t(rq->tag, data.hctx->queue_num);