2
0
mirror of https://github.com/edk2-porting/linux-next.git synced 2025-01-24 14:45:12 +08:00

nvme: simplify nvme_req_qid()

Use the request's '->mq_hctx->queue_num' directly to simplify the
nvme_req_qid() function.

Signed-off-by: Baolin Wang <baolin.wang@linux.alibaba.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
This commit is contained in:
Baolin Wang 2020-10-27 16:15:16 +08:00 committed by Christoph Hellwig
parent 03d99e5d63
commit 84115d6d80

View File

@ -178,7 +178,8 @@ static inline u16 nvme_req_qid(struct request *req)
{
if (!req->q->queuedata)
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