[SCSI] qla2xxx: Add asynchronous-login support.
[linux-2.6-block.git] / kernel / trace / trace_events.c
index 53c8fd376a88a18ac2c77f5073f76194a6e26c1a..e75276a49cf5cfa2fb968609602621fa8e5a5da3 100644 (file)
@@ -376,7 +376,7 @@ ftrace_event_seq_open(struct inode *inode, struct file *file)
        const struct seq_operations *seq_ops;
 
        if ((file->f_mode & FMODE_WRITE) &&
-           !(file->f_flags & O_APPEND))
+           (file->f_flags & O_TRUNC))
                ftrace_clear_events();
 
        seq_ops = inode->i_private;
@@ -940,7 +940,7 @@ event_create_dir(struct ftrace_event_call *call, struct dentry *d_events,
                entry = trace_create_file("enable", 0644, call->dir, call,
                                          enable);
 
-       if (call->id)
+       if (call->id && call->profile_enable)
                entry = trace_create_file("id", 0444, call->dir, call,
                                          id);