summaryrefslogtreecommitdiff
path: root/kernel/trace/trace_probe.c
diff options
context:
space:
mode:
authorMasami Hiramatsu <mhiramat@kernel.org>2019-06-01 00:17:37 +0900
committerSteven Rostedt (VMware) <rostedt@goodmis.org>2019-07-16 15:14:47 -0400
commit747774d6b018ca02493fd3f321624dfce749da61 (patch)
treee0420b7753ec8668a09d7744daab7f4e53ae5122 /kernel/trace/trace_probe.c
parentb5f935ee133911b3ed2d4429dd86d2bd5385519d (diff)
tracing/probe: Add trace flag access APIs for trace_probe
Add trace_probe_test/set/clear_flag() functions for accessing trace_probe.flag field. This flags field should not be accessed directly. Link: http://lkml.kernel.org/r/155931585683.28323.314290023236905988.stgit@devnote2 Signed-off-by: Masami Hiramatsu <mhiramat@kernel.org> Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
Diffstat (limited to 'kernel/trace/trace_probe.c')
-rw-r--r--kernel/trace/trace_probe.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/kernel/trace/trace_probe.c b/kernel/trace/trace_probe.c
index abb05608a09d..323a11ad1dad 100644
--- a/kernel/trace/trace_probe.c
+++ b/kernel/trace/trace_probe.c
@@ -948,7 +948,7 @@ int trace_probe_add_file(struct trace_probe *tp, struct trace_event_file *file)
link->file = file;
INIT_LIST_HEAD(&link->list);
list_add_tail_rcu(&link->list, &tp->files);
- tp->flags |= TP_FLAG_TRACE;
+ trace_probe_set_flag(tp, TP_FLAG_TRACE);
return 0;
}
@@ -979,7 +979,7 @@ int trace_probe_remove_file(struct trace_probe *tp,
kfree(link);
if (list_empty(&tp->files))
- tp->flags &= ~TP_FLAG_TRACE;
+ trace_probe_clear_flag(tp, TP_FLAG_TRACE);
return 0;
}