]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commite7a9eb92731c89c4620e2a6d12a58b9406ce60c5
tree553e44c9332afce5890e573785ce9887cd01a7ac
parent5729587936b647933bcf59f22edcb04639e33122
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