Make clearing of stale debug lock info independent of deleting map entry of lock itself. (#4353)

This is believed to address issue #4337 where stale information for debug locks in shown.
This commit is contained in:
Frank 2017-05-16 07:19:17 -07:00 committed by Harshavardhana
parent 5db1e9f3dd
commit cae4683971

View File

@ -240,14 +240,12 @@ func (n *nsLockMap) ForceUnlock(volume, path string) {
if _, found := n.lockMap[param]; found {
// Remove lock from the map.
delete(n.lockMap, param)
}
// delete the lock state entry for given
// <volume, path> pair.
err := n.deleteLockInfoEntryForVolumePath(param)
if err != nil {
errorIf(err, "Failed to delete lock info entry")
}
}
// <volume, path> pair. Ignore error as there
// is no way to report it back
n.deleteLockInfoEntryForVolumePath(param)
}
// lockInstance - frontend/top-level interface for namespace locks.