diff options
author | Steven Rostedt <srostedt@redhat.com> | 2009-01-21 15:24:56 -0500 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2009-01-22 04:27:16 -0500 |
commit | 97b17efe4537e11bf6669106cfe4ee2c5331b267 (patch) | |
tree | 46310b25ea38628fc631d4c4c248ebe66426036f /kernel/trace/trace.c | |
parent | 5bc4564b224c3d9fe6dddafa25f56059bd978231 (diff) |
ring-buffer: do not swap if recording is disabled
If the ring buffer recording has been disabled. Do not let
swapping of ring buffers occur. Simply return -EAGAIN.
Signed-off-by: Steven Rostedt <srostedt@redhat.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'kernel/trace/trace.c')
-rw-r--r-- | kernel/trace/trace.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/kernel/trace/trace.c b/kernel/trace/trace.c index 220c264e3111..757ae6f7e648 100644 --- a/kernel/trace/trace.c +++ b/kernel/trace/trace.c | |||
@@ -415,7 +415,7 @@ update_max_tr_single(struct trace_array *tr, struct task_struct *tsk, int cpu) | |||
415 | 415 | ||
416 | ftrace_enable_cpu(); | 416 | ftrace_enable_cpu(); |
417 | 417 | ||
418 | WARN_ON_ONCE(ret); | 418 | WARN_ON_ONCE(ret && ret != -EAGAIN); |
419 | 419 | ||
420 | __update_max_tr(tr, tsk, cpu); | 420 | __update_max_tr(tr, tsk, cpu); |
421 | __raw_spin_unlock(&ftrace_max_lock); | 421 | __raw_spin_unlock(&ftrace_max_lock); |