nvme: refactor ns->ctrl by request
authorMinwoo Im <minwoo.im.dev@gmail.com>
Wed, 13 Jan 2021 14:36:27 +0000 (23:36 +0900)
committerChristoph Hellwig <hch@lst.de>
Tue, 2 Feb 2021 09:26:11 +0000 (10:26 +0100)
commitfc97e942d90c2103755f2fcd9a068a4ee7dfc1bf
treeebb0c547d9745dd98665a89a5f4b3e0b5e81e0e1
parent0dc9edaf80ea3c48231d94cd482355699d453888
nvme: refactor ns->ctrl by request

Just for current code in nvme_cleanup_cmd(), we don't have to get
namespace instance, but we need controller instance.

Controller instance can be retrieved by namespace instance, but it can
be directly accessed by nvme_request instance from request.

ctrl = nvme_req(req)->ctrl;

We don't have to go around namespace instance from request instance
through gendisk.

Signed-off-by: Minwoo Im <minwoo.im.dev@gmail.com>
Reviewed-by: Sagi Grimberg <sagi@grimberg.me>
Signed-off-by: Christoph Hellwig <hch@lst.de>
drivers/nvme/host/core.c