diff options
author | Steven Rostedt <srostedt@redhat.com> | 2009-08-05 12:02:48 -0400 |
---|---|---|
committer | Steven Rostedt <rostedt@goodmis.org> | 2009-08-05 20:19:59 -0400 |
commit | 0f2541d299d233eddddee4345795e0c46264fd56 (patch) | |
tree | 19a1628703792d1e0ae8abe18c240d60a6e1705d /kernel | |
parent | e16852cfc5580b88cb327413ab8c89375f380592 (diff) | |
download | linux-0f2541d299d233eddddee4345795e0c46264fd56.tar.gz linux-0f2541d299d233eddddee4345795e0c46264fd56.tar.bz2 linux-0f2541d299d233eddddee4345795e0c46264fd56.zip |
ring-buffer: fix check of try_to_discard result
The function ring_buffer_discard_commit inversed the code path
of the result of try_to_discard. It should skip incrementing the
entry counter if try_to_discard succeeded. But instead, it increments
the entry conder if it succeeded to discard, and does not increment
it if it fails.
The result of this bug is that filtering will make the stat counters
incorrect.
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
Diffstat (limited to 'kernel')
-rw-r--r-- | kernel/trace/ring_buffer.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/kernel/trace/ring_buffer.c b/kernel/trace/ring_buffer.c index bf27bb7a63e2..2fd1752f0c85 100644 --- a/kernel/trace/ring_buffer.c +++ b/kernel/trace/ring_buffer.c @@ -1785,7 +1785,7 @@ void ring_buffer_discard_commit(struct ring_buffer *buffer, */ RB_WARN_ON(buffer, !local_read(&cpu_buffer->committing)); - if (!rb_try_to_discard(cpu_buffer, event)) + if (rb_try_to_discard(cpu_buffer, event)) goto out; /* |