|
@@ -908,32 +908,6 @@ event_subsystem_dir(const char *name, struct dentry *d_events)
|
|
return system->entry;
|
|
return system->entry;
|
|
}
|
|
}
|
|
|
|
|
|
-static void remove_subsystem_dir(const char *name)
|
|
|
|
-{
|
|
|
|
- struct event_subsystem *system;
|
|
|
|
-
|
|
|
|
- if (strcmp(name, TRACE_SYSTEM) == 0)
|
|
|
|
- return;
|
|
|
|
-
|
|
|
|
- list_for_each_entry(system, &event_subsystems, list) {
|
|
|
|
- if (strcmp(system->name, name) == 0) {
|
|
|
|
- if (!--system->nr_events) {
|
|
|
|
- struct event_filter *filter = system->filter;
|
|
|
|
-
|
|
|
|
- debugfs_remove_recursive(system->entry);
|
|
|
|
- list_del(&system->list);
|
|
|
|
- if (filter) {
|
|
|
|
- kfree(filter->filter_string);
|
|
|
|
- kfree(filter);
|
|
|
|
- }
|
|
|
|
- kfree(system->name);
|
|
|
|
- kfree(system);
|
|
|
|
- }
|
|
|
|
- break;
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
-}
|
|
|
|
-
|
|
|
|
static int
|
|
static int
|
|
event_create_dir(struct ftrace_event_call *call, struct dentry *d_events,
|
|
event_create_dir(struct ftrace_event_call *call, struct dentry *d_events,
|
|
const struct file_operations *id,
|
|
const struct file_operations *id,
|
|
@@ -1018,6 +992,32 @@ struct ftrace_module_file_ops {
|
|
struct file_operations filter;
|
|
struct file_operations filter;
|
|
};
|
|
};
|
|
|
|
|
|
|
|
+static void remove_subsystem_dir(const char *name)
|
|
|
|
+{
|
|
|
|
+ struct event_subsystem *system;
|
|
|
|
+
|
|
|
|
+ if (strcmp(name, TRACE_SYSTEM) == 0)
|
|
|
|
+ return;
|
|
|
|
+
|
|
|
|
+ list_for_each_entry(system, &event_subsystems, list) {
|
|
|
|
+ if (strcmp(system->name, name) == 0) {
|
|
|
|
+ if (!--system->nr_events) {
|
|
|
|
+ struct event_filter *filter = system->filter;
|
|
|
|
+
|
|
|
|
+ debugfs_remove_recursive(system->entry);
|
|
|
|
+ list_del(&system->list);
|
|
|
|
+ if (filter) {
|
|
|
|
+ kfree(filter->filter_string);
|
|
|
|
+ kfree(filter);
|
|
|
|
+ }
|
|
|
|
+ kfree(system->name);
|
|
|
|
+ kfree(system);
|
|
|
|
+ }
|
|
|
|
+ break;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+}
|
|
|
|
+
|
|
static struct ftrace_module_file_ops *
|
|
static struct ftrace_module_file_ops *
|
|
trace_create_file_ops(struct module *mod)
|
|
trace_create_file_ops(struct module *mod)
|
|
{
|
|
{
|