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: 9d62ed9651
("libnvdimm: handle locked label storage areas")
Cc: <stable@vger.kernel.org>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
This commit is contained in:
@@ -200,6 +200,13 @@ void nvdimm_set_locked(struct device *dev)
|
||||
set_bit(NDD_LOCKED, &nvdimm->flags);
|
||||
}
|
||||
|
||||
void nvdimm_clear_locked(struct device *dev)
|
||||
{
|
||||
struct nvdimm *nvdimm = to_nvdimm(dev);
|
||||
|
||||
clear_bit(NDD_LOCKED, &nvdimm->flags);
|
||||
}
|
||||
|
||||
static void nvdimm_release(struct device *dev)
|
||||
{
|
||||
struct nvdimm *nvdimm = to_nvdimm(dev);
|
||||
|
Reference in New Issue
Block a user