Closed ycaibb closed 3 years ago
Similarly, the lock &priv->mutex
is also not released in the block_cache_do_read
, thank you very much for your checking.
https://github.com/archiecobbs/s3backer/blob/016c3fe69760b6a0b03193e218b19488fa0862e8/block_cache.c#L753-L771
Your first comment is correct - thanks! Fixed in bee054a.
Your second comment is incorrect: the semantics of this function block_cache_do_read()
are that the mutex is assumed to be (already) held at function entry and exit.
@archiecobbs Thank you very much.
Hi, developers, thank you for your checking. It seems the lock
priv->mutex
is not released correctly whenpriv->num_threads == 0
in the functionblock_cache_read
? https://github.com/archiecobbs/s3backer/blob/016c3fe69760b6a0b03193e218b19488fa0862e8/block_cache.c#L617-L624