Merge pull request #24387 from owncloud/locking-mark-reload-free
free up memory when releasing the last shared lock
This commit is contained in:
commit
06293783e0
|
@ -77,6 +77,9 @@ abstract class AbstractLockingProvider implements ILockingProvider {
|
||||||
if ($type === self::LOCK_SHARED) {
|
if ($type === self::LOCK_SHARED) {
|
||||||
if (isset($this->acquiredLocks['shared'][$path]) and $this->acquiredLocks['shared'][$path] > 0) {
|
if (isset($this->acquiredLocks['shared'][$path]) and $this->acquiredLocks['shared'][$path] > 0) {
|
||||||
$this->acquiredLocks['shared'][$path]--;
|
$this->acquiredLocks['shared'][$path]--;
|
||||||
|
if ($this->acquiredLocks['shared'][$path] === 0) {
|
||||||
|
unset($this->acquiredLocks['shared'][$path]);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
} else if ($type === self::LOCK_EXCLUSIVE) {
|
} else if ($type === self::LOCK_EXCLUSIVE) {
|
||||||
unset($this->acquiredLocks['exclusive'][$path]);
|
unset($this->acquiredLocks['exclusive'][$path]);
|
||||||
|
|
Loading…
Reference in New Issue