diff options
author | Steven Rostedt <srostedt@redhat.com> | 2009-05-07 19:58:55 -0400 |
---|---|---|
committer | Steven Rostedt <rostedt@goodmis.org> | 2009-05-07 20:01:11 -0400 |
commit | 74f4fd21664148b8c454cc07bfe74e4dd51cf07b (patch) | |
tree | fa4074dff8913c25a9192c65c112de25cf07fbf4 /kernel/trace/ring_buffer.c | |
parent | 7da3046d6ce6ea97494020081c509b642b7016af (diff) |
ring-buffer: change WARN_ON from checking preempt_count to preemptible
There's a WARN_ON in the ring buffer code that makes sure preemption
is disabled. It checks "!preempt_count()". But when CONFIG_PREEMPT is not
enabled, preempt_count() is always zero, and this will trigger the warning.
[ Impact: prevent false warning on non preemptible kernels ]
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
Diffstat (limited to 'kernel/trace/ring_buffer.c')
-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 3ae5ccf2c0fc..361170609bd0 100644 --- a/kernel/trace/ring_buffer.c +++ b/kernel/trace/ring_buffer.c | |||
@@ -1688,7 +1688,7 @@ void ring_buffer_discard_commit(struct ring_buffer *buffer, | |||
1688 | * committed yet. Thus we can assume that preemption | 1688 | * committed yet. Thus we can assume that preemption |
1689 | * is still disabled. | 1689 | * is still disabled. |
1690 | */ | 1690 | */ |
1691 | RB_WARN_ON(buffer, !preempt_count()); | 1691 | RB_WARN_ON(buffer, preemptible()); |
1692 | 1692 | ||
1693 | cpu = smp_processor_id(); | 1693 | cpu = smp_processor_id(); |
1694 | cpu_buffer = buffer->buffers[cpu]; | 1694 | cpu_buffer = buffer->buffers[cpu]; |