From: Li Zefan Date: Tue, 8 Dec 2009 03:15:45 +0000 (+0800) Subject: function-graph: Allow writing the same val to set_graph_function X-Git-Tag: v2.6.33-rc1~52^2~10 X-Git-Url: https://openfabrics.org/gitweb/?a=commitdiff_plain;h=91baf6285be7282cfa487de92f836c50749dffb9;p=~shefty%2Frdma-dev.git function-graph: Allow writing the same val to set_graph_function # echo 'do_open' > set_graph_function # echo 'do_open' >> set_graph_function bash: echo: write error: Invalid argument Make it valid to write the same value to set_graph_function, which is consistent with set_ftrace_filter interface. Signed-off-by: Li Zefan Acked-by: Steven Rostedt LKML-reference: <4B1DC4E1.1060303@cn.fujitsu.com> Signed-off-by: Frederic Weisbecker --- diff --git a/kernel/trace/ftrace.c b/kernel/trace/ftrace.c index ff8aecdc6dd..7968762c816 100644 --- a/kernel/trace/ftrace.c +++ b/kernel/trace/ftrace.c @@ -2552,10 +2552,9 @@ ftrace_set_func(unsigned long *array, int *idx, char *buffer) exists = true; break; } - if (!exists) { + if (!exists) array[(*idx)++] = rec->ip; - found = 1; - } + found = 1; } } while_for_each_ftrace_rec();