提交 74f4fd21 编写于 作者: S Steven Rostedt 提交者: Steven Rostedt

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: NSteven Rostedt <rostedt@goodmis.org>
上级 7da3046d
......@@ -1688,7 +1688,7 @@ void ring_buffer_discard_commit(struct ring_buffer *buffer,
* committed yet. Thus we can assume that preemption
* is still disabled.
*/
RB_WARN_ON(buffer, !preempt_count());
RB_WARN_ON(buffer, preemptible());
cpu = smp_processor_id();
cpu_buffer = buffer->buffers[cpu];
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册