nvmet: get transport reference for passthru ctrl
authorChristoph Hellwig <hch@lst.de>
Thu, 17 Sep 2020 01:11:01 +0000 (18:11 -0700)
committerChristoph Hellwig <hch@lst.de>
Thu, 17 Sep 2020 08:36:25 +0000 (10:36 +0200)
commit3a6b076168e20a50289d71f601f1dd02be0f8e88
treea2f312634f5c551b47b71bd28d103cf96ccbe827
parent52a3974feb1a3eec25d8836d37a508b67b0a9cd0
nvmet: get transport reference for passthru ctrl

Grab a reference to the transport driver to ensure it can't be unloaded
while a passthrough controller is active.

Fixes: c1fef73f793b ("nvmet: add passthru code to process commands")
Reported-by: Chaitanya Kulkarni <chaitanya.kulkarni@wdc.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Logan Gunthorpe <logang@deltatee.com>
drivers/nvme/target/passthru.c