diff options
Diffstat (limited to 'kernel/trace/trace_output.c')
-rw-r--r-- | kernel/trace/trace_output.c | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/kernel/trace/trace_output.c b/kernel/trace/trace_output.c index c05aff465dc9..7938f3ae93e3 100644 --- a/kernel/trace/trace_output.c +++ b/kernel/trace/trace_output.c | |||
@@ -14,7 +14,7 @@ | |||
14 | /* must be a power of 2 */ | 14 | /* must be a power of 2 */ |
15 | #define EVENT_HASHSIZE 128 | 15 | #define EVENT_HASHSIZE 128 |
16 | 16 | ||
17 | static DECLARE_RWSEM(trace_event_mutex); | 17 | DECLARE_RWSEM(trace_event_mutex); |
18 | 18 | ||
19 | DEFINE_PER_CPU(struct trace_seq, ftrace_event_seq); | 19 | DEFINE_PER_CPU(struct trace_seq, ftrace_event_seq); |
20 | EXPORT_PER_CPU_SYMBOL(ftrace_event_seq); | 20 | EXPORT_PER_CPU_SYMBOL(ftrace_event_seq); |
@@ -702,6 +702,16 @@ int register_ftrace_event(struct trace_event *event) | |||
702 | } | 702 | } |
703 | EXPORT_SYMBOL_GPL(register_ftrace_event); | 703 | EXPORT_SYMBOL_GPL(register_ftrace_event); |
704 | 704 | ||
705 | /* | ||
706 | * Used by module code with the trace_event_mutex held for write. | ||
707 | */ | ||
708 | int __unregister_ftrace_event(struct trace_event *event) | ||
709 | { | ||
710 | hlist_del(&event->node); | ||
711 | list_del(&event->list); | ||
712 | return 0; | ||
713 | } | ||
714 | |||
705 | /** | 715 | /** |
706 | * unregister_ftrace_event - remove a no longer used event | 716 | * unregister_ftrace_event - remove a no longer used event |
707 | * @event: the event to remove | 717 | * @event: the event to remove |
@@ -709,8 +719,7 @@ EXPORT_SYMBOL_GPL(register_ftrace_event); | |||
709 | int unregister_ftrace_event(struct trace_event *event) | 719 | int unregister_ftrace_event(struct trace_event *event) |
710 | { | 720 | { |
711 | down_write(&trace_event_mutex); | 721 | down_write(&trace_event_mutex); |
712 | hlist_del(&event->node); | 722 | __unregister_ftrace_event(event); |
713 | list_del(&event->list); | ||
714 | up_write(&trace_event_mutex); | 723 | up_write(&trace_event_mutex); |
715 | 724 | ||
716 | return 0; | 725 | return 0; |