From: Mathieu Desnoyers Date: Thu, 27 Jan 2022 19:24:10 +0000 (-0500) Subject: Rename struct lttng_metadata_stream list field to node X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=94ac1e1748949a24c9b3305bbd4b89493b3e545e;p=lttng-modules.git Rename struct lttng_metadata_stream list field to node Signed-off-by: Mathieu Desnoyers Change-Id: Iaefccfd27d18cbb90726f6b77400409eeea493d0 --- diff --git a/include/lttng/events-internal.h b/include/lttng/events-internal.h index fb9830cf..092e7c70 100644 --- a/include/lttng/events-internal.h +++ b/include/lttng/events-internal.h @@ -380,7 +380,7 @@ struct lttng_metadata_stream { unsigned int metadata_out; /* Bytes consumed from stream */ int finalized; /* Has channel been finalized */ wait_queue_head_t read_wait; /* Reader buffer-level wait queue */ - struct list_head list; /* Stream list */ + struct list_head node; /* Stream list */ struct lttng_transport *transport; uint64_t version; /* Current version of the metadata cache */ bool coherent; /* Stream in a coherent state */ diff --git a/src/lttng-abi.c b/src/lttng-abi.c index afc024ed..36dbddde 100644 --- a/src/lttng-abi.c +++ b/src/lttng-abi.c @@ -1551,7 +1551,7 @@ int lttng_metadata_ring_buffer_release(struct inode *inode, struct file *file) struct lttng_kernel_ring_buffer *buf = stream->priv; mutex_lock(&stream->metadata_cache->lock); - list_del(&stream->list); + list_del(&stream->node); mutex_unlock(&stream->metadata_cache->lock); kref_put(&stream->metadata_cache->refcount, metadata_cache_destroy); module_put(stream->transport->owner); @@ -1709,7 +1709,7 @@ int lttng_abi_open_metadata_stream(struct file *channel_file) goto fd_error; mutex_lock(&session->priv->metadata_cache->lock); - list_add(&metadata_stream->list, + list_add(&metadata_stream->node, &session->priv->metadata_cache->metadata_stream); mutex_unlock(&session->priv->metadata_cache->lock); return ret; diff --git a/src/lttng-events.c b/src/lttng-events.c index e3fa5daa..2f07ebc1 100644 --- a/src/lttng-events.c +++ b/src/lttng-events.c @@ -375,7 +375,7 @@ void lttng_session_destroy(struct lttng_kernel_session *session) _lttng_channel_destroy(chan_priv->pub); } mutex_lock(&session->priv->metadata_cache->lock); - list_for_each_entry(metadata_stream, &session->priv->metadata_cache->metadata_stream, list) + list_for_each_entry(metadata_stream, &session->priv->metadata_cache->metadata_stream, node) _lttng_metadata_channel_hangup(metadata_stream); mutex_unlock(&session->priv->metadata_cache->lock); lttng_id_tracker_fini(&session->pid_tracker); @@ -548,7 +548,7 @@ int lttng_session_metadata_regenerate(struct lttng_kernel_session *session) memset(cache->data, 0, cache->cache_alloc); cache->metadata_written = 0; cache->version++; - list_for_each_entry(stream, &session->priv->metadata_cache->metadata_stream, list) { + list_for_each_entry(stream, &session->priv->metadata_cache->metadata_stream, node) { stream->metadata_out = 0; stream->metadata_in = 0; } @@ -2788,7 +2788,7 @@ void lttng_metadata_end(struct lttng_kernel_session *session) if (atomic_dec_return(&session->priv->metadata_cache->producing) == 0) { struct lttng_metadata_stream *stream; - list_for_each_entry(stream, &session->priv->metadata_cache->metadata_stream, list) + list_for_each_entry(stream, &session->priv->metadata_cache->metadata_stream, node) wake_up_interruptible(&stream->read_wait); mutex_unlock(&session->priv->metadata_cache->lock); }