diff options
author | Christoph Hellwig <hch@lst.de> | 2022-03-15 15:53:59 +0100 |
---|---|---|
committer | Christoph Hellwig <hch@lst.de> | 2022-03-16 09:47:05 +0100 |
commit | e559398f47e090394bbbd9006349c858e1ba80da (patch) | |
tree | 8703d78a1206fcaac48cecedd3e38feac5ec95fc /drivers/nvme/target | |
parent | nvme: cleanup how disk->disk_name is assigned (diff) | |
download | linux-e559398f47e090394bbbd9006349c858e1ba80da.tar.xz linux-e559398f47e090394bbbd9006349c858e1ba80da.zip |
nvme: remove nvme_alloc_request and nvme_alloc_request_qid
Just open code the allocation + initialization in the callers.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Keith Busch <kbusch@kernel.org>
Reviewed-by: Sagi Grimberg <sagi@grimberg.me>
Reviewed-by: Chaitanya Kulkarni <kch@nvidia.com>
Diffstat (limited to 'drivers/nvme/target')
-rw-r--r-- | drivers/nvme/target/passthru.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/nvme/target/passthru.c b/drivers/nvme/target/passthru.c index a810bf569fff..a4de1e0d518b 100644 --- a/drivers/nvme/target/passthru.c +++ b/drivers/nvme/target/passthru.c @@ -254,11 +254,12 @@ static void nvmet_passthru_execute_cmd(struct nvmet_req *req) timeout = nvmet_req_subsys(req)->admin_timeout; } - rq = nvme_alloc_request(q, req->cmd, 0); + rq = blk_mq_alloc_request(q, nvme_req_op(req->cmd), 0); if (IS_ERR(rq)) { status = NVME_SC_INTERNAL; goto out_put_ns; } + nvme_init_request(rq, req->cmd); if (timeout) rq->timeout = timeout; |