X-Git-Url: https://git.liburcu.org/?a=blobdiff_plain;f=src%2Fcommon%2Fconsumer-metadata-cache.c;h=c6e6c6b164a423b81dace0312ee3c71c9cb3626e;hb=a9838785aecf564595c531772f7ca906b658afa0;hp=0c20e7fc7cbba6850a3337fc4ebb788d3e5d5f84;hpb=faeeaa0c38c2877c2dd614804a3a813900b1288e;p=lttng-tools.git diff --git a/src/common/consumer-metadata-cache.c b/src/common/consumer-metadata-cache.c index 0c20e7fc7..c6e6c6b16 100644 --- a/src/common/consumer-metadata-cache.c +++ b/src/common/consumer-metadata-cache.c @@ -204,6 +204,7 @@ int consumer_metadata_cache_flushed(struct lttng_consumer_channel *channel, cache = channel->metadata_cache; pthread_mutex_lock(&consumer_data.lock); + pthread_mutex_lock(&channel->lock); pthread_mutex_lock(&channel->metadata_cache->lock); if (cache->rb_pushed >= offset) { @@ -224,6 +225,7 @@ int consumer_metadata_cache_flushed(struct lttng_consumer_channel *channel, } pthread_mutex_unlock(&channel->metadata_cache->lock); + pthread_mutex_unlock(&channel->lock); pthread_mutex_unlock(&consumer_data.lock); return ret;