diff options
author | Robin Appelman <icewind@owncloud.com> | 2015-05-13 13:54:15 +0200 |
---|---|---|
committer | Robin Appelman <icewind@owncloud.com> | 2015-06-01 13:22:56 +0200 |
commit | 1270c6800dd439e411278764e3a2ddb2f68040ac (patch) | |
tree | 74a80429ed743d29fc1b9243e564160609bf5d49 /lib | |
parent | 35c377f7a9a0413bea5fa6768467c6e5f7c2d83e (diff) | |
download | nextcloud-server-1270c6800dd439e411278764e3a2ddb2f68040ac.tar.gz nextcloud-server-1270c6800dd439e411278764e3a2ddb2f68040ac.zip |
dont lock on meta data operations
Diffstat (limited to 'lib')
-rw-r--r-- | lib/private/files/view.php | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/private/files/view.php b/lib/private/files/view.php index b8bbd60f028..b1333b4150c 100644 --- a/lib/private/files/view.php +++ b/lib/private/files/view.php @@ -960,7 +960,7 @@ class View { if ($run and $storage) { if (in_array('write', $hooks) || in_array('delete', $hooks)) { $this->lockFile($path, ILockingProvider::LOCK_EXCLUSIVE); - } else { + } else if (in_array('read', $hooks)) { $this->lockFile($path, ILockingProvider::LOCK_SHARED); } try { @@ -972,7 +972,7 @@ class View { } catch (\Exception $e) { if (in_array('write', $hooks) || in_array('delete', $hooks)) { $this->unlockFile($path, ILockingProvider::LOCK_EXCLUSIVE); - } else { + } else if (in_array('read', $hooks)) { $this->unlockFile($path, ILockingProvider::LOCK_SHARED); } throw $e; @@ -992,14 +992,14 @@ class View { $result = CallbackWrapper::wrap($result, null, null, function () use ($hooks, $path) { if (in_array('write', $hooks)) { $this->unlockFile($path, ILockingProvider::LOCK_EXCLUSIVE); - } else { + } else if (in_array('read', $hooks)) { $this->unlockFile($path, ILockingProvider::LOCK_SHARED); } }); } else { if (in_array('write', $hooks) || in_array('delete', $hooks)) { $this->unlockFile($path, ILockingProvider::LOCK_EXCLUSIVE); - } else { + } else if (in_array('read', $hooks)) { $this->unlockFile($path, ILockingProvider::LOCK_SHARED); } } |