From: Mathieu Desnoyers Date: Fri, 20 May 2016 01:31:07 +0000 (-0400) Subject: Fix: only flush non-metadata channels X-Git-Tag: v2.8.0~2 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=588f1f26e43f37b377952a8f223179c226dde87b;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 6b74f6e8..400c5eca 100644 --- a/lttng-events.c +++ b/lttng-events.c @@ -240,8 +240,10 @@ int lttng_session_enable(struct lttng_session *session) lttng_session_sync_enablers(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; @@ -275,8 +277,10 @@ int lttng_session_disable(struct lttng_session *session) lttng_session_sync_enablers(session); /* 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); return ret;