llseek: automatically add .llseek fop
[sfrench/cifs-2.6.git] / kernel / trace / ftrace.c
index 7cb1f45a1de1ccf61e9cfcf59e0abe0642f12cf2..5e1ad476309060b6b697b6475f7fc5de96bbc5a2 100644 (file)
@@ -800,6 +800,7 @@ static const struct file_operations ftrace_profile_fops = {
        .open           = tracing_open_generic,
        .read           = ftrace_profile_read,
        .write          = ftrace_profile_write,
+       .llseek         = default_llseek,
 };
 
 /* used to initialize the real stat files */
@@ -1510,6 +1511,8 @@ static void *t_start(struct seq_file *m, loff_t *pos)
                if (*pos > 0)
                        return t_hash_start(m, pos);
                iter->flags |= FTRACE_ITER_PRINTALL;
+               /* reset in case of seek/pread */
+               iter->flags &= ~FTRACE_ITER_HASH;
                return iter;
        }
 
@@ -2416,7 +2419,7 @@ static const struct file_operations ftrace_filter_fops = {
        .open = ftrace_filter_open,
        .read = seq_read,
        .write = ftrace_filter_write,
-       .llseek = ftrace_regex_lseek,
+       .llseek = no_llseek,
        .release = ftrace_filter_release,
 };
 
@@ -2630,6 +2633,7 @@ static const struct file_operations ftrace_graph_fops = {
        .read           = seq_read,
        .write          = ftrace_graph_write,
        .release        = ftrace_graph_release,
+       .llseek         = seq_lseek,
 };
 #endif /* CONFIG_FUNCTION_GRAPH_TRACER */