projects
/
lttng-tools.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix: intialization of ust_metadata_poll_pipe to garbage value
[lttng-tools.git]
/
src
/
bin
/
lttng-relayd
/
ctf-trace.c
diff --git
a/src/bin/lttng-relayd/ctf-trace.c
b/src/bin/lttng-relayd/ctf-trace.c
index 59946ea4a8810bde2edc67414d782f34fc4032cb..02a8b2bf16e6b553ccd6d4059c88634aa42bd49d 100644
(file)
--- a/
src/bin/lttng-relayd/ctf-trace.c
+++ b/
src/bin/lttng-relayd/ctf-trace.c
@@
-39,6
+39,14
@@
static void rcu_destroy_ctf_trace(struct rcu_head *head)
free(trace);
}
free(trace);
}
+static void rcu_destroy_stream(struct rcu_head *head)
+{
+ struct relay_stream *stream =
+ caa_container_of(head, struct relay_stream, rcu_node);
+
+ stream_destroy(stream);
+}
+
/*
* Destroy a ctf trace and all stream contained in it.
*
/*
* Destroy a ctf trace and all stream contained in it.
*
@@
-58,7
+66,7
@@
void ctf_trace_destroy(struct ctf_trace *obj)
cds_list_for_each_entry_safe(stream, tmp_stream, &obj->stream_list,
trace_list) {
stream_delete(relay_streams_ht, stream);
cds_list_for_each_entry_safe(stream, tmp_stream, &obj->stream_list,
trace_list) {
stream_delete(relay_streams_ht, stream);
-
stream_destroy(
stream);
+
call_rcu(&stream->rcu_node, rcu_destroy_
stream);
}
call_rcu(&obj->node.head, rcu_destroy_ctf_trace);
}
call_rcu(&obj->node.head, rcu_destroy_ctf_trace);
@@
-109,6
+117,8
@@
error:
/*
* Return a ctf_trace object if found by id in the given hash table else NULL.
/*
* Return a ctf_trace object if found by id in the given hash table else NULL.
+ *
+ * Must be called with rcu_read_lock() taken.
*/
struct ctf_trace *ctf_trace_find_by_path(struct lttng_ht *ht,
char *path_name)
*/
struct ctf_trace *ctf_trace_find_by_path(struct lttng_ht *ht,
char *path_name)
This page took
0.024124 seconds
and
4
git commands to generate.