Skip to contentSkip to conversation

nvme: release ida resources

PATCH Applied Max Gurtovoy 3 participants 3 messages Mar 18, 2020 NVMe

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 nvme: release ida resources

ida instances allocate some internal memory in addition to the base 'struct ida'. Use ida_destroy() to release that memory at module_exit().

---
 drivers/nvme/host/core.c | 1 +
 1 file changed, 1 insertion(+)
drivers/nvme/host/core.c +1 -0
index a4d8c90..31bbf40 100644
@@ -4299,6 +4299,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");
Signature · 7 lines
1.8.3.1


_______________________________________________
linux-nvme mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-nvme
maintainer Reviewed-by on v1 1/1
#1 lore raw
Quoted 13 lines · Max Gurtovoy

ida instances allocate some internal memory in addition to the base 'struct ida'. Use ida_destroy() to release that memory at module_exit().

---
 drivers/nvme/host/core.c | 1 +
 1 file changed, 1 insertion(+)
drivers/nvme/host/core.c +0 -0
index a4d8c90..31bbf40 100644

drivers/nvme/host/core.c static void __exit nvme_core_exit(void) · line 4302

Quoted 4 lines
drivers/nvme/host/core.c +1 -0
@@ -4299,6 +4299,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);

Looks good,

_______________________________________________
linux-nvme mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-nvme

maintainer Applied
#2 lore raw
In reply to Max Gurtovoy
Quoted 13 lines · Max Gurtovoy

ida instances allocate some internal memory in addition to the base 'struct ida'. Use ida_destroy() to release that memory at module_exit().

---
 drivers/nvme/host/core.c | 1 +
 1 file changed, 1 insertion(+)
drivers/nvme/host/core.c +0 -0
index a4d8c90..31bbf40 100644

drivers/nvme/host/core.c static void __exit nvme_core_exit(void) · line 4305

Quoted 7 lines
drivers/nvme/host/core.c +1 -0
@@ -4299,6 +4299,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");

Thank you, applied to nvme-5.7.

_______________________________________________
linux-nvme mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-nvme