diff options
Diffstat (limited to 'kernel/trace/trace_events.c')
-rw-r--r-- | kernel/trace/trace_events.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/kernel/trace/trace_events.c b/kernel/trace/trace_events.c index 70ecb7653b46..e0cbede96783 100644 --- a/kernel/trace/trace_events.c +++ b/kernel/trace/trace_events.c | |||
@@ -378,7 +378,7 @@ ftrace_event_seq_open(struct inode *inode, struct file *file) | |||
378 | const struct seq_operations *seq_ops; | 378 | const struct seq_operations *seq_ops; |
379 | 379 | ||
380 | if ((file->f_mode & FMODE_WRITE) && | 380 | if ((file->f_mode & FMODE_WRITE) && |
381 | !(file->f_flags & O_APPEND)) | 381 | (file->f_flags & O_TRUNC)) |
382 | ftrace_clear_events(); | 382 | ftrace_clear_events(); |
383 | 383 | ||
384 | seq_ops = inode->i_private; | 384 | seq_ops = inode->i_private; |
@@ -945,7 +945,7 @@ event_create_dir(struct ftrace_event_call *call, struct dentry *d_events, | |||
945 | entry = trace_create_file("enable", 0644, call->dir, call, | 945 | entry = trace_create_file("enable", 0644, call->dir, call, |
946 | enable); | 946 | enable); |
947 | 947 | ||
948 | if (call->id) | 948 | if (call->id && call->profile_enable) |
949 | entry = trace_create_file("id", 0444, call->dir, call, | 949 | entry = trace_create_file("id", 0444, call->dir, call, |
950 | id); | 950 | id); |
951 | 951 | ||