ftrace: prevent recursion

Impact: prevent unnecessary stack recursion

if the resched flag was set before we entered, then don't reschedule.

Signed-off-by: Lai Jiangshan <laijs@cn.fujitsu.com>
Acked-by: Steven Rostedt <rostedt@goodmis.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
This commit is contained in:
Lai Jiangshan 2008-11-27 10:21:46 +08:00 committed by Ingo Molnar
parent fb91ee6cf5
commit 4f5a7f40dd

View File

@ -1215,7 +1215,7 @@ ring_buffer_lock_reserve(struct ring_buffer *buffer,
out: out:
if (resched) if (resched)
preempt_enable_notrace(); preempt_enable_no_resched_notrace();
else else
preempt_enable_notrace(); preempt_enable_notrace();
return NULL; return NULL;