]> git.baikalelectronics.ru Git - kernel.git/commit
nvme: fix per-namespace chardev deletion
authorAdam Manzanares <a.manzanares@samsung.com>
Wed, 13 Oct 2021 15:04:19 +0000 (15:04 +0000)
committerChristoph Hellwig <hch@lst.de>
Thu, 14 Oct 2021 06:07:47 +0000 (08:07 +0200)
commitd2174f61297df6eb2109539f7a43cd38f82efa0f
tree10f011cf9460d5e6b4051493750d9214e30a0b45
parent1f165a81528918143591815b6ed1110a36253f4f
nvme: fix per-namespace chardev deletion

Decrease reference count of chardevice during char device deletion in
order to fix a memory leak.  Add a release callabck for the device
associated chardev and move ida_simple_remove into the release function.

Fixes: bfad1693ac73 ("nvme: introduce generic per-namespace chardev")
Reported-by: Yi Zhang <yi.zhang@redhat.com>
Suggested-by: Sagi Grimberg <sagi@grimberg.me>
Signed-off-by: Adam Manzanares <a.manzanares@samsung.com>
Reviewed-by: Javier González <javier@javigon.com>
Tested-by: Yi Zhang <yi.zhang@redhat.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
drivers/nvme/host/core.c
drivers/nvme/host/multipath.c