summaryrefslogtreecommitdiff
path: root/drivers/dax/bus.c
diff options
context:
space:
mode:
authorDan Williams <dan.j.williams@intel.com>2023-06-02 23:14:11 -0700
committerVishal Verma <vishal.l.verma@intel.com>2023-06-23 01:03:50 -0600
commit2532f41607c4308733239dd43278f8a5540f3ec7 (patch)
tree6e43c94541c871b5e8cbd60bcddad92816e79263 /drivers/dax/bus.c
parent70aab281e18c68a1284bc387de127c2fc0bed3f8 (diff)
dax: Cleanup extra dax_region references
Now that free_dev_dax_id() internally manages the references it needs the extra references taken by the dax_region drivers are not needed. Reported-by: Ira Weiny <ira.weiny@intel.com> Signed-off-by: Dan Williams <dan.j.williams@intel.com> Link: https://lore.kernel.org/r/168577285161.1672036.8111253437794419696.stgit@dwillia2-xfh.jf.intel.com Reviewed-by: Dave Jiang <dave.jiang@intel.com> Reviewed-by: Fan Ni <fan.ni@samsung.com> Reviewed-by: Ira Weiny <ira.weiny@intel.com> Signed-off-by: Vishal Verma <vishal.l.verma@intel.com>
Diffstat (limited to 'drivers/dax/bus.c')
-rw-r--r--drivers/dax/bus.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/dax/bus.c b/drivers/dax/bus.c
index a4cc3eca774f..0ee96e6fc426 100644
--- a/drivers/dax/bus.c
+++ b/drivers/dax/bus.c
@@ -454,11 +454,10 @@ static void dax_region_free(struct kref *kref)
kfree(dax_region);
}
-void dax_region_put(struct dax_region *dax_region)
+static void dax_region_put(struct dax_region *dax_region)
{
kref_put(&dax_region->kref, dax_region_free);
}
-EXPORT_SYMBOL_GPL(dax_region_put);
/* a return value >= 0 indicates this invocation invalidated the id */
static int __free_dev_dax_id(struct dev_dax *dev_dax)
@@ -641,7 +640,6 @@ struct dax_region *alloc_dax_region(struct device *parent, int region_id,
return NULL;
}
- kref_get(&dax_region->kref);
if (devm_add_action_or_reset(parent, dax_region_unregister, dax_region))
return NULL;
return dax_region;