From: Steven Rostedt (Red Hat) Date: Tue, 14 Jan 2014 17:33:33 +0000 (-0500) Subject: tracing: Only let top level have option files X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=f1b21c9a40704dfdf7b8423c7d2969ea31c9857d;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git tracing: Only let top level have option files Currently, only the top level instance can have tracing options. Signed-off-by: Steven Rostedt --- diff --git a/kernel/trace/trace.c b/kernel/trace/trace.c index 944cd021aabf..da9543cdbe7a 100644 --- a/kernel/trace/trace.c +++ b/kernel/trace/trace.c @@ -3968,9 +3968,11 @@ static int tracing_set_tracer(struct trace_array *tr, const char *buf) free_snapshot(tr); } #endif - destroy_trace_option_files(topts); - - topts = create_trace_option_files(tr, t); + /* Currently, only the top instance has options */ + if (tr->flags & TRACE_ARRAY_FL_GLOBAL) { + destroy_trace_option_files(topts); + topts = create_trace_option_files(tr, t); + } #ifdef CONFIG_TRACER_MAX_TRACE if (t->use_max_tr && !had_max_tr) {