X-Git-Url: http://git.efficios.com/?p=lttng-tools.git;a=blobdiff_plain;f=src%2Fcommon%2Fkernel-consumer%2Fkernel-consumer.c;h=c0d56171c89f5224f397a347c7774d54d9d32db0;hp=f47c498777531ef6702b41d34b153abba3320e1e;hb=a0c83db984f8c20897666eef226b43fce81d0e13;hpb=07d2ae956551db46c137f85847a6d2972b1b0c9d diff --git a/src/common/kernel-consumer/kernel-consumer.c b/src/common/kernel-consumer/kernel-consumer.c index f47c49877..c0d56171c 100644 --- a/src/common/kernel-consumer/kernel-consumer.c +++ b/src/common/kernel-consumer/kernel-consumer.c @@ -255,11 +255,11 @@ int lttng_kconsumer_recv_cmd(struct lttng_consumer_local_data *ctx, new_stream->chan = channel; new_stream->wait_fd = fd; - /* Metadata chan refcount is increment in add_metadata_stream */ - if (new_stream->chan->type != CONSUMER_CHANNEL_TYPE_METADATA) { - /* Update channel refcount */ - uatomic_inc(&new_stream->chan->refcount); - } + /* + * We've just assigned the channel to the stream so increment the + * refcount right now. + */ + uatomic_inc(&new_stream->chan->refcount); /* * The buffer flush is done on the session daemon side for the kernel