Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 91baf628 authored by Li Zefan's avatar Li Zefan Committed by Frederic Weisbecker
Browse files

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: default avatarLi Zefan <lizf@cn.fujitsu.com>
Acked-by: default avatarSteven Rostedt <rostedt@goodmis.org>
LKML-reference: <4B1DC4E1.1060303@cn.fujitsu.com>
Signed-off-by: default avatarFrederic Weisbecker <fweisbec@gmail.com>
parent 313254a9
Loading
Loading
Loading
Loading
+2 −3
Original line number Original line Diff line number Diff line
@@ -2552,11 +2552,10 @@ ftrace_set_func(unsigned long *array, int *idx, char *buffer)
					exists = true;
					exists = true;
					break;
					break;
				}
				}
			if (!exists) {
			if (!exists)
				array[(*idx)++] = rec->ip;
				array[(*idx)++] = rec->ip;
			found = 1;
			found = 1;
		}
		}
		}
	} while_for_each_ftrace_rec();
	} while_for_each_ftrace_rec();


	mutex_unlock(&ftrace_lock);
	mutex_unlock(&ftrace_lock);