NVMe: Reference count open namespaces
authorKeith Busch <keith.busch@intel.com>
Thu, 1 Oct 2015 23:14:10 +0000 (17:14 -0600)
committerJens Axboe <axboe@fb.com>
Fri, 9 Oct 2015 16:40:36 +0000 (10:40 -0600)
commit188c3568f814fea965947ed24739987ba9c5a87e
tree553e44c9332afce5890e573785ce9887cd01a7ac
parent54ef2b96879334caf8803fdd93b4c556d709d6fd
NVMe: Reference count open namespaces

Dynamic namespace attachment means the namespace may be removed at any
time, so the namespace reference count can not be tied to the device
reference count. This fixes a NULL dereference if an opened namespace
is detached from a controller.

Signed-off-by: Keith Busch <keith.busch@intel.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Jens Axboe <axboe@fb.com>
drivers/block/nvme-core.c
include/linux/nvme.h