mirror of
https://github.com/minio/minio.git
synced 2025-12-07 00:02:31 -05:00
To avoid this issue with refCounter refactor the code such that - locker() always increases refCount upon success - unlocker() always decrements refCount upon success (as a special case removes the resource if the refCount is zero) By these two assumptions we are able to see that we are never granted two write lockers in any situation. Thanks to @vcabbage for writing a nice reproducer.
2.9 KiB
2.9 KiB