]> Pileus Git - ~andy/linux/blobdiff - kernel/trace/trace.c
Merge branch 'tip/perf/core-2' of git://git.kernel.org/pub/scm/linux/kernel/git/roste...
[~andy/linux] / kernel / trace / trace.c
index d1a8d07ec86612d37953c1a28902533d463443f5..08acf42e325b1276fe54205a3f42f656a0b6fe9d 100644 (file)
@@ -3187,10 +3187,10 @@ static int tracing_set_tracer(const char *buf)
        }
        destroy_trace_option_files(topts);
 
-       current_trace = t;
+       current_trace = &nop_trace;
 
-       topts = create_trace_option_files(current_trace);
-       if (current_trace->use_max_tr) {
+       topts = create_trace_option_files(t);
+       if (t->use_max_tr) {
                int cpu;
                /* we need to make per cpu buffer sizes equivalent */
                for_each_tracing_cpu(cpu) {
@@ -3210,6 +3210,7 @@ static int tracing_set_tracer(const char *buf)
                        goto out;
        }
 
+       current_trace = t;
        trace_branch_enable(tr);
  out:
        mutex_unlock(&trace_types_lock);