summaryrefslogtreecommitdiff
path: root/drivers/nvdimm/dimm.c
diff options
context:
space:
mode:
authorDan Williams <dan.j.williams@intel.com>2017-09-25 21:01:31 +0300
committerDan Williams <dan.j.williams@intel.com>2017-09-28 19:10:14 +0300
commitd34cb808402898e53b9a9bcbbedd01667a78723b (patch)
treed4ea0dbd680af3ddf3b3ec5655916a76fa21f57b /drivers/nvdimm/dimm.c
parente19b205be43d11bff638cad4487008c48d21c103 (diff)
downloadlinux-d34cb808402898e53b9a9bcbbedd01667a78723b.tar.xz
libnvdimm, dimm: clear 'locked' status on successful DIMM enable
If we successfully enable a DIMM then it must not be locked and we can clear the label-read failure condition. Otherwise, we need to reload the entire bus provider driver to achieve the same effect, and that can disrupt unrelated DIMMs and namespaces. Fixes: 9d62ed965118 ("libnvdimm: handle locked label storage areas") Cc: <stable@vger.kernel.org> Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Diffstat (limited to 'drivers/nvdimm/dimm.c')
-rw-r--r--drivers/nvdimm/dimm.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/nvdimm/dimm.c b/drivers/nvdimm/dimm.c
index e0f0e3ce1a32..98466d762c8f 100644
--- a/drivers/nvdimm/dimm.c
+++ b/drivers/nvdimm/dimm.c
@@ -68,6 +68,7 @@ static int nvdimm_probe(struct device *dev)
rc = nd_label_reserve_dpa(ndd);
if (ndd->ns_current >= 0)
nvdimm_set_aliasing(dev);
+ nvdimm_clear_locked(dev);
nvdimm_bus_unlock(dev);
if (rc)