From: Mathieu Desnoyers Date: Fri, 20 May 2016 01:31:07 +0000 (-0400) Subject: Fix: only flush non-metadata channels X-Git-Tag: v2.6.6~2 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=d36743ab6802f2ab236b04d4f7e7af388999f249;p=lttng-modules.git Fix: only flush non-metadata channels Issue introduced by commit "Fix: do not generate packet at destroy after stop". Signed-off-by: Mathieu Desnoyers --- diff --git a/lttng-events.c b/lttng-events.c index c1297674..8befa34f 100644 --- a/lttng-events.c +++ b/lttng-events.c @@ -189,8 +189,10 @@ int lttng_session_enable(struct lttng_session *session) } /* Clear each stream's quiescent state. */ - list_for_each_entry(chan, &session->chan, list) - lib_ring_buffer_clear_quiescent_channel(chan->chan); + list_for_each_entry(chan, &session->chan, list) { + if (chan->channel_type != METADATA_CHANNEL) + lib_ring_buffer_clear_quiescent_channel(chan->chan); + } ACCESS_ONCE(session->active) = 1; ACCESS_ONCE(session->been_active) = 1; @@ -220,8 +222,10 @@ int lttng_session_disable(struct lttng_session *session) ACCESS_ONCE(session->active) = 0; /* Set each stream's quiescent state. */ - list_for_each_entry(chan, &session->chan, list) - lib_ring_buffer_set_quiescent_channel(chan->chan); + list_for_each_entry(chan, &session->chan, list) { + if (chan->channel_type != METADATA_CHANNEL) + lib_ring_buffer_set_quiescent_channel(chan->chan); + } end: mutex_unlock(&sessions_mutex);