summaryrefslogtreecommitdiffstats
path: root/drivers/nvdimm/region_devs.c
diff options
context:
space:
mode:
authorDan Williams <dan.j.williams@intel.com>2016-05-18 05:24:16 +0200
committerDan Williams <dan.j.williams@intel.com>2016-05-21 07:02:56 +0200
commitb354aba0165519a74f540f2ba89d7ec78efca21d (patch)
tree7d15ce8e3fdcd8e899385fd543b9afa396e47fd7 /drivers/nvdimm/region_devs.c
parentRevert "block: enable dax for raw block devices" (diff)
downloadlinux-b354aba0165519a74f540f2ba89d7ec78efca21d.tar.xz
linux-b354aba0165519a74f540f2ba89d7ec78efca21d.zip
libnvdimm: release ida resources
ida instances allocate some internal memory for ->free_bitmap in addition to the base 'struct ida'. Use ida_destroy() to release that memory at module_exit(). Reported-by: Johannes Thumshirn <jthumshirn@suse.de> Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de> Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Diffstat (limited to 'drivers/nvdimm/region_devs.c')
-rw-r--r--drivers/nvdimm/region_devs.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/nvdimm/region_devs.c b/drivers/nvdimm/region_devs.c
index 9e1b054e0e61..40fcfea26fbb 100644
--- a/drivers/nvdimm/region_devs.c
+++ b/drivers/nvdimm/region_devs.c
@@ -793,3 +793,8 @@ struct nd_region *nvdimm_volatile_region_create(struct nvdimm_bus *nvdimm_bus,
__func__);
}
EXPORT_SYMBOL_GPL(nvdimm_volatile_region_create);
+
+void __exit nd_region_devs_exit(void)
+{
+ ida_destroy(&region_ida);
+}