tracing/event: Cleanup the useless dentry variable
Cleanup the useless dentry variable while creating a kernel event set of files. trace_create_file() warns if it fails to create the file anyway, and we don't store the dentry anywhere. v2: Fix a small conflict in kernel/trace/trace_events.c Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com> Cc: Steven Rostedt <rostedt@goodmis.org> Cc: Li Zefan <lizf@cn.fujitsu.com>
This commit is contained in:
parent
737f453fd1
commit
f3f3f00924
|
@ -898,7 +898,7 @@ event_subsystem_dir(const char *name, struct dentry *d_events)
|
||||||
"'%s/filter' entry\n", name);
|
"'%s/filter' entry\n", name);
|
||||||
}
|
}
|
||||||
|
|
||||||
entry = trace_create_file("enable", 0644, system->entry,
|
trace_create_file("enable", 0644, system->entry,
|
||||||
(void *)system->name,
|
(void *)system->name,
|
||||||
&ftrace_system_enable_fops);
|
&ftrace_system_enable_fops);
|
||||||
|
|
||||||
|
@ -912,7 +912,6 @@ event_create_dir(struct ftrace_event_call *call, struct dentry *d_events,
|
||||||
const struct file_operations *filter,
|
const struct file_operations *filter,
|
||||||
const struct file_operations *format)
|
const struct file_operations *format)
|
||||||
{
|
{
|
||||||
struct dentry *entry;
|
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -930,11 +929,11 @@ event_create_dir(struct ftrace_event_call *call, struct dentry *d_events,
|
||||||
}
|
}
|
||||||
|
|
||||||
if (call->regfunc)
|
if (call->regfunc)
|
||||||
entry = trace_create_file("enable", 0644, call->dir, call,
|
trace_create_file("enable", 0644, call->dir, call,
|
||||||
enable);
|
enable);
|
||||||
|
|
||||||
if (call->id && call->profile_enable)
|
if (call->id && call->profile_enable)
|
||||||
entry = trace_create_file("id", 0444, call->dir, call,
|
trace_create_file("id", 0444, call->dir, call,
|
||||||
id);
|
id);
|
||||||
|
|
||||||
if (call->define_fields) {
|
if (call->define_fields) {
|
||||||
|
@ -944,7 +943,7 @@ event_create_dir(struct ftrace_event_call *call, struct dentry *d_events,
|
||||||
" events/%s\n", call->name);
|
" events/%s\n", call->name);
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
entry = trace_create_file("filter", 0644, call->dir, call,
|
trace_create_file("filter", 0644, call->dir, call,
|
||||||
filter);
|
filter);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -952,7 +951,7 @@ event_create_dir(struct ftrace_event_call *call, struct dentry *d_events,
|
||||||
if (!call->show_format)
|
if (!call->show_format)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
entry = trace_create_file("format", 0444, call->dir, call,
|
trace_create_file("format", 0444, call->dir, call,
|
||||||
format);
|
format);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
|
Loading…
Reference in New Issue