]> git.baikalelectronics.ru Git - kernel.git/commit
nvme/host: reference the fabric module for each bdev open callout
authorSagi Grimberg <sagig@mellanox.com>
Wed, 10 Feb 2016 18:03:29 +0000 (10:03 -0800)
committerJens Axboe <axboe@fb.com>
Wed, 10 Feb 2016 21:22:32 +0000 (14:22 -0700)
commita6a528261e49f328d0eb198a01f130aabd8c9940
tree8d3573e86cdc7116a40f21242f481ce6e80dbc63
parenta64fed326cff8e95ab4535424b9c9293923c955d
nvme/host: reference the fabric module for each bdev open callout

We don't want to be able to unload the fabric driver when we have
openened referenced to our namespaces. Thus, for each nvme_open we
take a reference on the fabric driver and put it in nvme_release.
This behavior is consistent with the scsi model.

This resolves the panic when unloading a fabric module with
mpath holders.

Signed-off-by: Sagi Grimberg <sagig@mellanox.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Ian Bakshan <ianb@mellanox.com>
Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de>
Signed-off-by: Ming Lin <ming.l@ssi.samsung.com>
Signed-off-by: Jens Axboe <axboe@fb.com>
drivers/nvme/host/core.c
drivers/nvme/host/nvme.h
drivers/nvme/host/pci.c