tracing: Kill destroy_call_preds()
authorOleg Nesterov <oleg@redhat.com>
Tue, 15 Jul 2014 18:48:16 +0000 (20:48 +0200)
committerSteven Rostedt <rostedt@goodmis.org>
Wed, 16 Jul 2014 18:22:32 +0000 (14:22 -0400)
Remove destroy_call_preds(). Its only caller, __trace_remove_event_call(),
can use free_event_filter() and nullify ->filter by hand.

Perhaps we could keep this trivial helper although imo it is pointless, but
then it should be static in trace_events.c.

Link: http://lkml.kernel.org/p/20140715184816.GA20495@redhat.com
Signed-off-by: Oleg Nesterov <oleg@redhat.com>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
include/linux/ftrace_event.h
kernel/trace/trace_events.c
kernel/trace/trace_events_filter.c

index 738d465..f434d75 100644 (file)
@@ -404,7 +404,6 @@ enum event_trigger_type {
        ETT_EVENT_ENABLE        = (1 << 3),
 };
 
-extern void destroy_call_preds(struct ftrace_event_call *call);
 extern int filter_match_preds(struct event_filter *filter, void *rec);
 
 extern int filter_check_discard(struct ftrace_event_file *file, void *rec,
index 85914ed..0d8ee29 100644 (file)
@@ -1748,7 +1748,8 @@ static void __trace_remove_event_call(struct ftrace_event_call *call)
 {
        event_remove(call);
        trace_destroy_fields(call);
-       destroy_call_preds(call);
+       free_event_filter(call->filter);
+       call->filter = NULL;
 }
 
 static int probe_remove_event_call(struct ftrace_event_call *call)
index 30fc66f..1edec32 100644 (file)
@@ -804,12 +804,6 @@ void free_event_filter(struct event_filter *filter)
        __free_filter(filter);
 }
 
-void destroy_call_preds(struct ftrace_event_call *call)
-{
-       __free_filter(call->filter);
-       call->filter = NULL;
-}
-
 static struct event_filter *__alloc_filter(void)
 {
        struct event_filter *filter;