]> www.infradead.org Git - users/jedix/linux-maple.git/commit
NVMe: Reference count open namespaces
authorKeith Busch <keith.busch@intel.com>
Thu, 1 Oct 2015 23:14:10 +0000 (17:14 -0600)
committerChuck Anderson <chuck.anderson@oracle.com>
Wed, 6 Jul 2016 23:31:54 +0000 (16:31 -0700)
commit08582ada41e6db429de956968284fb116e5d55f4
treecb71e257b09ace44e6d754f7466a35f5625322fc
parent85a5939099e2605243c32ff483502cf085d90b7e
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>
(cherry picked from commit 188c3568f814fea965947ed24739987ba9c5a87e)

Orabug: 22620486
Signed-off-by: Jason Luo <zhangqing.luo@oracle.com>
drivers/block/nvme-core.c
include/linux/nvme.h