From: Mathieu Desnoyers Date: Fri, 20 May 2016 01:31:07 +0000 (-0400) Subject: Fix: only flush non-metadata channels X-Git-Tag: v2.9.0-rc1~52 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=09b93db9df068c8150c7a7ea69452eff0650f609;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 f2a9a8a5..928886f3 100644 --- a/lttng-events.c +++ b/lttng-events.c @@ -244,8 +244,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; @@ -279,8 +281,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;