提交 84115d6d 编写于 作者: B Baolin Wang 提交者: Christoph Hellwig

nvme: simplify nvme_req_qid()

Use the request's '->mq_hctx->queue_num' directly to simplify the
nvme_req_qid() function.
Signed-off-by: NBaolin Wang <baolin.wang@linux.alibaba.com>
Signed-off-by: NChristoph Hellwig <hch@lst.de>
上级 03d99e5d
...@@ -178,7 +178,8 @@ static inline u16 nvme_req_qid(struct request *req) ...@@ -178,7 +178,8 @@ static inline u16 nvme_req_qid(struct request *req)
{ {
if (!req->q->queuedata) if (!req->q->queuedata)
return 0; return 0;
return blk_mq_unique_tag_to_hwq(blk_mq_unique_tag(req)) + 1;
return req->mq_hctx->queue_num + 1;
} }
/* The below value is the specific amount of delay needed before checking /* The below value is the specific amount of delay needed before checking
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册