]> pilppa.org Git - linux-2.6-omap-h63xx.git/commitdiff
ftrace: return EOF in trace_pipe on change of tracer
authorSteven Rostedt <rostedt@goodmis.org>
Mon, 12 May 2008 19:20:58 +0000 (21:20 +0200)
committerThomas Gleixner <tglx@linutronix.de>
Fri, 23 May 2008 19:47:01 +0000 (21:47 +0200)
Break out of while loop with EOF when the current_trace changes.

Signed-off-by: Steven Rostedt <srostedt@redhat.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
kernel/trace/trace.c

index d141fc98f3a88867410d6a4cd2c8f9835596c0c7..2af940433e9672371782145937108d7e0477b074 100644 (file)
@@ -2253,6 +2253,9 @@ tracing_read_pipe(struct file *filp, char __user *ubuf,
                if (signal_pending(current))
                        return -EINTR;
 
+               if (iter->trace != current_trace)
+                       return 0;
+
                /*
                 * We block until we read something and tracing is disabled.
                 * We still block if tracing is disabled, but we have never