diff options
author | Chaitanya Kulkarni <chaitanya.kulkarni@wdc.com> | 2021-02-09 21:48:01 -0800 |
---|---|---|
committer | Christoph Hellwig <hch@lst.de> | 2021-02-10 16:38:05 +0100 |
commit | 20c2c3bb83f26c42bf62cc773f96f30848ed11a2 (patch) | |
tree | 9e4995e67f373f99dd23d9bcec7f34fc241146c3 /drivers/nvme/target/passthru.c | |
parent | d86481e924a7d6e8a40477ffa98077c6c0d77ed5 (diff) | |
download | lwn-20c2c3bb83f26c42bf62cc773f96f30848ed11a2.tar.gz lwn-20c2c3bb83f26c42bf62cc773f96f30848ed11a2.zip |
nvmet: add nvmet_req_subsys() helper
Just like what we have to get the passthru ctrl from the req, add an
helper to get the subsystem associated with the nvmet_req() instead
of open coding the chain of structures.
Signed-off-by: Chaitanya Kulkarni <chaitanya.kulkarni@wdc.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Diffstat (limited to 'drivers/nvme/target/passthru.c')
-rw-r--r-- | drivers/nvme/target/passthru.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/nvme/target/passthru.c b/drivers/nvme/target/passthru.c index 3b22f4a868f4..f50c7b2bf21c 100644 --- a/drivers/nvme/target/passthru.c +++ b/drivers/nvme/target/passthru.c @@ -239,9 +239,9 @@ static void nvmet_passthru_execute_cmd(struct nvmet_req *req) } q = ns->queue; - timeout = req->sq->ctrl->subsys->io_timeout; + timeout = nvmet_req_subsys(req)->io_timeout; } else { - timeout = req->sq->ctrl->subsys->admin_timeout; + timeout = nvmet_req_subsys(req)->admin_timeout; } rq = nvme_alloc_request(q, req->cmd, 0); |