Properly decouple individual metadata locks

Thanks to @CapnBry for the heads-up here.
This commit is contained in:
Gina Häußge committed 2018-04-25 17:01:24 +02:00
1 parent 135cf6a9cc
commit c3bb651d9e
1 file changed
+2 -1
+2 -1
View File
@@ -1604,8 +1604,9 @@ class LocalFileStorage(StorageInterface):
counter += 1
self._metadata_locks[path] = (counter, lock)
yield lock
yield lock
with self._metadata_lock_mutex:
counter = self._metadata_locks[path][0]
counter -= 1
if counter <= 0: