diff mbox

[2/2] blk-mq: make sure to back-assign the request to rq_map in blk_mq_alloc_request_hctx

Message ID 1488209781-1084-2-git-send-email-sagi@grimberg.me (mailing list archive)
State New, archived
Headers show

Commit Message

Sagi Grimberg Feb. 27, 2017, 3:36 p.m. UTC
Otherwise we won't be able to retrieve the request from
the tag.

Signed-off-by: Sagi Grimberg <sagi@grimberg.me>
---
 block/blk-mq.c | 1 +
 1 file changed, 1 insertion(+)
diff mbox

Patch

diff --git a/block/blk-mq.c b/block/blk-mq.c
index d84c66fb37b7..9611cd9920e9 100644
--- a/block/blk-mq.c
+++ b/block/blk-mq.c
@@ -312,6 +312,7 @@  struct request *blk_mq_alloc_request_hctx(struct request_queue *q, int rw,
 		ret = -EWOULDBLOCK;
 		goto out_queue_exit;
 	}
+	alloc_data.hctx->tags->rqs[rq->tag] = rq;
 
 	return rq;