From: "Steven Rostedt (Red Hat)" <rost...@goodmis.org>

Currently, only the top level instance can have tracing options.

Signed-off-by: Steven Rostedt <rost...@goodmis.org>
---
 kernel/trace/trace.c | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/kernel/trace/trace.c b/kernel/trace/trace.c
index 944cd02..da9543c 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) {
-- 
1.8.5.3


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Reply via email to