libnvdimm, dimm: clear 'locked' status on successful DIMM enable
authorDan Williams <dan.j.williams@intel.com>
Mon, 25 Sep 2017 18:01:31 +0000 (11:01 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 30 Nov 2017 08:40:54 +0000 (08:40 +0000)
commit0f8fb6d5c2b77631c9b8d45417d2146e914ddb1b
treeea1393cccc65866df9fbec0be523896a2872a583
parentbf93b23582af410df8e9ddd682e9a5c4d48b2c65
libnvdimm, dimm: clear 'locked' status on successful DIMM enable

commit d34cb808402898e53b9a9bcbbedd01667a78723b upstream.

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")
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/nvdimm/dimm.c
drivers/nvdimm/dimm_devs.c
drivers/nvdimm/nd.h