tracing: Factorize filter creation
authorTejun Heo <tj@kernel.org>
Thu, 15 Dec 2011 22:31:35 +0000 (14:31 -0800)
committerSteven Rostedt <rostedt@goodmis.org>
Wed, 21 Dec 2011 12:27:02 +0000 (07:27 -0500)
commit38b78eb855409a05f9d370228bec1955e6878e08
tree4f07483d49aaa53f7b6905a482f05ddcde4834de
parent762e1207889b3451c50d365b741af6f9ce958886
tracing: Factorize filter creation

There are four places where new filter for a given filter string is
created, which involves several different steps.  This patch factors
those steps into create_[system_]filter() functions which in turn make
use of create_filter_{start|finish}() for common parts.

The only functional change is that if replace_filter_string() is
requested and fails, creation fails without any side effect instead of
being ignored.

Note that system filter is now installed after the processing is
complete which makes freeing before and then restoring filter string
on error unncessary.

-v2: Rebased to resolve conflict with 49aa29513e and updated both
     create_filter() functions to always set *filterp instead of
     requiring the caller to clear it to %NULL on entry.

Link: http://lkml.kernel.org/r/1323988305-1469-2-git-send-email-tj@kernel.org
Signed-off-by: Tejun Heo <tj@kernel.org>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
kernel/trace/trace_events_filter.c