]> git.baikalelectronics.ru Git - kernel.git/commit
ring-buffer: fix check of try_to_discard result
authorSteven Rostedt <srostedt@redhat.com>
Wed, 5 Aug 2009 16:02:48 +0000 (12:02 -0400)
committerSteven Rostedt <rostedt@goodmis.org>
Thu, 6 Aug 2009 00:19:59 +0000 (20:19 -0400)
commit5df798163a5cd519c03b6b43b2332d8f28b743f8
tree19a1628703792d1e0ae8abe18c240d60a6e1705d
parentd1e9d1a99996f0981cd42854e6ac16a01fd4dee5
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>
kernel/trace/ring_buffer.c