]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
nvme: release ida resources
authorMax Gurtovoy <maxg@mellanox.com>
Wed, 18 Mar 2020 15:27:59 +0000 (17:27 +0200)
committerKeith Busch <kbusch@kernel.org>
Wed, 25 Mar 2020 19:51:55 +0000 (04:51 +0900)
ida instances allocate some internal memory in addition to the base
'struct ida'. Use ida_destroy() to release that memory at module_exit().

Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Max Gurtovoy <maxg@mellanox.com>
Signed-off-by: Keith Busch <kbusch@kernel.org>
drivers/nvme/host/core.c

index 3c1c826ea491b4b9432c70604d373bb54db0e284..ad0847b6c769a0174bb0e6c38429b3eff81b48ee 100644 (file)
@@ -4358,6 +4358,7 @@ static void __exit nvme_core_exit(void)
        destroy_workqueue(nvme_delete_wq);
        destroy_workqueue(nvme_reset_wq);
        destroy_workqueue(nvme_wq);
+       ida_destroy(&nvme_instance_ida);
 }
 
 MODULE_LICENSE("GPL");