nvme: lift the file open code from nvme_ctrl_get_by_path
authorChaitanya Kulkarni <chaitanya.kulkarni@wdc.com>
Thu, 17 Sep 2020 01:11:02 +0000 (18:11 -0700)
committerChristoph Hellwig <hch@lst.de>
Sun, 27 Sep 2020 07:14:18 +0000 (09:14 +0200)
commitb2702aaaa45c2d1028bc8c51b49106041be7aae5
tree42e856da90fda2d7b0b02c6b6c2f0b7bf7c2e9de
parent163090c14a42778c3ccfbdaf39133129bea68632
nvme: lift the file open code from nvme_ctrl_get_by_path

Lift opening the file open/close code from nvme_ctrl_get_by_path into
the caller, just keeping a simple nvme_ctrl_from_file() helper.

Signed-off-by: Chaitanya Kulkarni <chaitanya.kulkarni@wdc.com>
[hch: refactored a bit, split the bug fixes into a separate prep patch]
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Logan Gunthorpe <logang@deltatee.com>
drivers/nvme/host/core.c
drivers/nvme/host/nvme.h
drivers/nvme/target/passthru.c