Commit a8f72022 authored by Dan Williams's avatar Dan Williams
Browse files

libnvdimm: keep region data alive over namespace removal

nd_region device driver data will be used in the namespace i/o path.
Re-order nd_region_remove() to ensure this data stays live across
namespace device removal

Signed-off-by: default avatarDan Williams <>
parent 85d3fa02
......@@ -82,6 +82,8 @@ static int nd_region_remove(struct device *dev)
struct nd_region *nd_region = to_nd_region(dev);
device_for_each_child(dev, NULL, child_unregister);
/* flush attribute readers and disable */
nd_region->ns_seed = NULL;
......@@ -91,7 +93,6 @@ static int nd_region_remove(struct device *dev)
dev_set_drvdata(dev, NULL);
device_for_each_child(dev, NULL, child_unregister);
return 0;
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment