diff options
author | Dan Williams <dan.j.williams@intel.com> | 2015-12-13 11:41:36 -0800 |
---|---|---|
committer | Dan Williams <dan.j.williams@intel.com> | 2015-12-13 11:41:36 -0800 |
commit | 2dc43331e34fa992a67f42ed44e5111cafafd6f3 (patch) | |
tree | 2889839d23244dee5e2b52a42fa9d9d845cb8165 /drivers/nvdimm/region_devs.c | |
parent | a34d5e8a6ad1a31b186019c9c351777626698863 (diff) | |
download | lwn-2dc43331e34fa992a67f42ed44e5111cafafd6f3.tar.gz lwn-2dc43331e34fa992a67f42ed44e5111cafafd6f3.zip |
libnvdimm, pfn: fix pfn seed creation
Similar to btt, plant a new pfn seed when the existing one is activated.
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.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/nvdimm/region_devs.c b/drivers/nvdimm/region_devs.c index 3d730d1f25db..9c632f73915e 100644 --- a/drivers/nvdimm/region_devs.c +++ b/drivers/nvdimm/region_devs.c @@ -490,6 +490,13 @@ static void nd_region_notify_driver_action(struct nvdimm_bus *nvdimm_bus, nd_region_create_blk_seed(nd_region); nvdimm_bus_unlock(dev); } + if (is_nd_pfn(dev) && probe) { + nd_region = to_nd_region(dev->parent); + nvdimm_bus_lock(dev); + if (nd_region->pfn_seed == dev) + nd_region_create_pfn_seed(nd_region); + nvdimm_bus_unlock(dev); + } } void nd_region_probe_success(struct nvdimm_bus *nvdimm_bus, struct device *dev) |