aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/trace/ftrace.c
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/trace/ftrace.c')
-rw-r--r--kernel/trace/ftrace.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/kernel/trace/ftrace.c b/kernel/trace/ftrace.c
index 03cf44ac54d3..a77e4a0142ee 100644
--- a/kernel/trace/ftrace.c
+++ b/kernel/trace/ftrace.c
@@ -3776,7 +3776,6 @@ static const struct file_operations ftrace_notrace_fops = {
3776static DEFINE_MUTEX(graph_lock); 3776static DEFINE_MUTEX(graph_lock);
3777 3777
3778int ftrace_graph_count; 3778int ftrace_graph_count;
3779int ftrace_graph_filter_enabled;
3780unsigned long ftrace_graph_funcs[FTRACE_GRAPH_MAX_FUNCS] __read_mostly; 3779unsigned long ftrace_graph_funcs[FTRACE_GRAPH_MAX_FUNCS] __read_mostly;
3781 3780
3782static void * 3781static void *
@@ -3799,7 +3798,7 @@ static void *g_start(struct seq_file *m, loff_t *pos)
3799 mutex_lock(&graph_lock); 3798 mutex_lock(&graph_lock);
3800 3799
3801 /* Nothing, tell g_show to print all functions are enabled */ 3800 /* Nothing, tell g_show to print all functions are enabled */
3802 if (!ftrace_graph_filter_enabled && !*pos) 3801 if (!ftrace_graph_count && !*pos)
3803 return (void *)1; 3802 return (void *)1;
3804 3803
3805 return __g_next(m, pos); 3804 return __g_next(m, pos);
@@ -3845,7 +3844,6 @@ ftrace_graph_open(struct inode *inode, struct file *file)
3845 mutex_lock(&graph_lock); 3844 mutex_lock(&graph_lock);
3846 if ((file->f_mode & FMODE_WRITE) && 3845 if ((file->f_mode & FMODE_WRITE) &&
3847 (file->f_flags & O_TRUNC)) { 3846 (file->f_flags & O_TRUNC)) {
3848 ftrace_graph_filter_enabled = 0;
3849 ftrace_graph_count = 0; 3847 ftrace_graph_count = 0;
3850 memset(ftrace_graph_funcs, 0, sizeof(ftrace_graph_funcs)); 3848 memset(ftrace_graph_funcs, 0, sizeof(ftrace_graph_funcs));
3851 } 3849 }
@@ -3925,8 +3923,6 @@ out:
3925 if (fail) 3923 if (fail)
3926 return -EINVAL; 3924 return -EINVAL;
3927 3925
3928 ftrace_graph_filter_enabled = !!(*idx);
3929
3930 return 0; 3926 return 0;
3931} 3927}
3932 3928