no need to keep the channel lock during stream rotation
authorJulien Desfossez <jdesfossez@efficios.com>
Wed, 23 Aug 2017 20:35:32 +0000 (16:35 -0400)
committerJulien Desfossez <jdesfossez@efficios.com>
Wed, 6 Sep 2017 17:59:58 +0000 (13:59 -0400)
Signed-off-by: Julien Desfossez <jdesfossez@efficios.com>
src/common/consumer/consumer.c

index 240cb3e83bf4f41045b55543bab9eb77a6c654e0..40c4229533d1c9b4cc5a36a3f14296ac6786b725 100644 (file)
@@ -3961,8 +3961,10 @@ int lttng_consumer_rotate_channel(uint64_t key, char *path,
        if (ret < 0) {
                ERR("Trace directory creation error");
                ret = -1;
-               goto end_unlock_channel;
+               pthread_mutex_unlock(&channel->lock);
+               goto end;
        }
+       pthread_mutex_unlock(&channel->lock);
 
        cds_lfht_for_each_entry_duplicate(ht->ht,
                        ht->hash_fct(&channel->key, lttng_ht_seed),
@@ -4013,12 +4015,10 @@ int lttng_consumer_rotate_channel(uint64_t key, char *path,
        }
 
        ret = 0;
-       goto end_unlock_channel;
+       goto end;
 
 end_unlock:
        pthread_mutex_unlock(&stream->lock);
-end_unlock_channel:
-       pthread_mutex_unlock(&channel->lock);
 end:
        rcu_read_unlock();
        return ret;
This page took 0.030189 seconds and 5 git commands to generate.