tracing: Only let top level have option files
authorSteven Rostedt (Red Hat) <rostedt@goodmis.org>
Tue, 14 Jan 2014 17:33:33 +0000 (12:33 -0500)
committerSteven Rostedt <rostedt@goodmis.org>
Thu, 20 Feb 2014 17:13:11 +0000 (12:13 -0500)
Currently, only the top level instance can have tracing options.

Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
kernel/trace/trace.c

index 944cd021aabfb45c8334db144873b6641dff065e..da9543cdbe7a139daf331dad34651467f0bb4724 100644 (file)
@@ -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) {