diff options
Diffstat (limited to 'kernel')
| -rw-r--r-- | kernel/trace/trace_events.c | 52 |
1 files changed, 26 insertions, 26 deletions
diff --git a/kernel/trace/trace_events.c b/kernel/trace/trace_events.c index 90cf9360e140..70ecb7653b46 100644 --- a/kernel/trace/trace_events.c +++ b/kernel/trace/trace_events.c | |||
| @@ -908,32 +908,6 @@ event_subsystem_dir(const char *name, struct dentry *d_events) | |||
| 908 | return system->entry; | 908 | return system->entry; |
| 909 | } | 909 | } |
| 910 | 910 | ||
| 911 | static void remove_subsystem_dir(const char *name) | ||
| 912 | { | ||
| 913 | struct event_subsystem *system; | ||
| 914 | |||
| 915 | if (strcmp(name, TRACE_SYSTEM) == 0) | ||
| 916 | return; | ||
| 917 | |||
| 918 | list_for_each_entry(system, &event_subsystems, list) { | ||
| 919 | if (strcmp(system->name, name) == 0) { | ||
| 920 | if (!--system->nr_events) { | ||
| 921 | struct event_filter *filter = system->filter; | ||
| 922 | |||
| 923 | debugfs_remove_recursive(system->entry); | ||
| 924 | list_del(&system->list); | ||
| 925 | if (filter) { | ||
| 926 | kfree(filter->filter_string); | ||
| 927 | kfree(filter); | ||
| 928 | } | ||
| 929 | kfree(system->name); | ||
| 930 | kfree(system); | ||
| 931 | } | ||
| 932 | break; | ||
| 933 | } | ||
| 934 | } | ||
| 935 | } | ||
| 936 | |||
| 937 | static int | 911 | static int |
| 938 | event_create_dir(struct ftrace_event_call *call, struct dentry *d_events, | 912 | event_create_dir(struct ftrace_event_call *call, struct dentry *d_events, |
| 939 | const struct file_operations *id, | 913 | const struct file_operations *id, |
| @@ -1018,6 +992,32 @@ struct ftrace_module_file_ops { | |||
| 1018 | struct file_operations filter; | 992 | struct file_operations filter; |
| 1019 | }; | 993 | }; |
| 1020 | 994 | ||
| 995 | static void remove_subsystem_dir(const char *name) | ||
| 996 | { | ||
| 997 | struct event_subsystem *system; | ||
| 998 | |||
| 999 | if (strcmp(name, TRACE_SYSTEM) == 0) | ||
| 1000 | return; | ||
| 1001 | |||
| 1002 | list_for_each_entry(system, &event_subsystems, list) { | ||
| 1003 | if (strcmp(system->name, name) == 0) { | ||
| 1004 | if (!--system->nr_events) { | ||
| 1005 | struct event_filter *filter = system->filter; | ||
| 1006 | |||
| 1007 | debugfs_remove_recursive(system->entry); | ||
| 1008 | list_del(&system->list); | ||
| 1009 | if (filter) { | ||
| 1010 | kfree(filter->filter_string); | ||
| 1011 | kfree(filter); | ||
| 1012 | } | ||
| 1013 | kfree(system->name); | ||
| 1014 | kfree(system); | ||
| 1015 | } | ||
| 1016 | break; | ||
| 1017 | } | ||
| 1018 | } | ||
| 1019 | } | ||
| 1020 | |||
| 1021 | static struct ftrace_module_file_ops * | 1021 | static struct ftrace_module_file_ops * |
| 1022 | trace_create_file_ops(struct module *mod) | 1022 | trace_create_file_ops(struct module *mod) |
| 1023 | { | 1023 | { |
