ftrace: Call trace_parser_clear() properly
authorLi Zefan <lizf@cn.fujitsu.com>
Tue, 8 Dec 2009 03:15:30 +0000 (11:15 +0800)
committerFrederic Weisbecker <fweisbec@gmail.com>
Sun, 13 Dec 2009 17:37:26 +0000 (18:37 +0100)
commit313254a9400d388b46150c0f355e216418a2f598
tree190c360ad60b27763e2f95dc5cf8fa9068d3d71e
parent311d16da575f53c3367099579736c1d233efe0dc
ftrace: Call trace_parser_clear() properly

I found a weird behavior:

  # echo 'fuse:*' > set_ftrace_filter
  bash: echo: write error: Invalid argument
  # cat set_ftrace_filter
  fuse_dev_fasync
  fuse_dev_poll
  fuse_copy_do

We should call trace_parser_clear() no matter ftrace_process_regex()
returns 0 or -errno, otherwise we will actually take the unaccepted
records from ftrace_regex_release().

Signed-off-by: Li Zefan <lizf@cn.fujitsu.com>
Acked-by: Steven Rostedt <rostedt@goodmis.org>
LKML-Reference: <4B1DC4D2.3000406@cn.fujitsu.com>
Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com>
kernel/trace/ftrace.c