avoid deadlock: cancel hydration requests coming from itself
authorMatthieu Gallien <matthieu.gallien@nextcloud.com>
Mon, 1 Jul 2024 14:10:02 +0000 (16:10 +0200)
committerbackportbot[bot] <backportbot[bot]@users.noreply.github.com>
Mon, 1 Jul 2024 14:15:34 +0000 (14:15 +0000)
commit3a34b396eae6ee6ccb7c91c1a6f55e6cf5fc719f
treeaf42aa4f2538a68894b7e54426545377569769f5
parent0324395accfcaf95f49ec09d0b0f26866352da57
avoid deadlock: cancel hydration requests coming from itself

our current infrastructure will cause a deadlock for any hydration
requests coming from desktop files client itself

the main thread is responsible for executing the hydration request but
if the same thread is already blocked waiting for the hydration to
happen, both (open system call and hydration request handling) process
will never be completed and wait for each over in a stuck cycle

Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
src/libsync/vfs/cfapi/cfapiwrapper.cpp