diff options
author | Steven Rostedt (Red Hat) <rostedt@goodmis.org> | 2013-04-12 16:40:13 -0400 |
---|---|---|
committer | Steven Rostedt <rostedt@goodmis.org> | 2013-04-12 17:12:41 -0400 |
commit | 7f49ef69db6bbf756c0abca7e9b65b32e999eec8 (patch) | |
tree | a98bda9589c09a84bedf6346e2acdae605fc9fb9 /kernel | |
parent | 6a76f8c0ab19f215af2a3442870eeb5f0e81998d (diff) |
ftrace: Move ftrace_filter_lseek out of CONFIG_DYNAMIC_FTRACE section
As ftrace_filter_lseek is now used with ftrace_pid_fops, it needs to
be moved out of the #ifdef CONFIG_DYNAMIC_FTRACE section as the
ftrace_pid_fops is defined when DYNAMIC_FTRACE is not.
Cc: stable@vger.kernel.org
Cc: Namhyung Kim <namhyung@kernel.org>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
Diffstat (limited to 'kernel')
-rw-r--r-- | kernel/trace/ftrace.c | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/kernel/trace/ftrace.c b/kernel/trace/ftrace.c index affc35d829cc..2461ede45a8d 100644 --- a/kernel/trace/ftrace.c +++ b/kernel/trace/ftrace.c | |||
@@ -1052,6 +1052,19 @@ static __init void ftrace_profile_debugfs(struct dentry *d_tracer) | |||
1052 | 1052 | ||
1053 | static struct pid * const ftrace_swapper_pid = &init_struct_pid; | 1053 | static struct pid * const ftrace_swapper_pid = &init_struct_pid; |
1054 | 1054 | ||
1055 | loff_t | ||
1056 | ftrace_filter_lseek(struct file *file, loff_t offset, int whence) | ||
1057 | { | ||
1058 | loff_t ret; | ||
1059 | |||
1060 | if (file->f_mode & FMODE_READ) | ||
1061 | ret = seq_lseek(file, offset, whence); | ||
1062 | else | ||
1063 | file->f_pos = ret = 1; | ||
1064 | |||
1065 | return ret; | ||
1066 | } | ||
1067 | |||
1055 | #ifdef CONFIG_DYNAMIC_FTRACE | 1068 | #ifdef CONFIG_DYNAMIC_FTRACE |
1056 | 1069 | ||
1057 | #ifndef CONFIG_FTRACE_MCOUNT_RECORD | 1070 | #ifndef CONFIG_FTRACE_MCOUNT_RECORD |
@@ -2612,7 +2625,7 @@ static void ftrace_filter_reset(struct ftrace_hash *hash) | |||
2612 | * routine, you can use ftrace_filter_write() for the write | 2625 | * routine, you can use ftrace_filter_write() for the write |
2613 | * routine if @flag has FTRACE_ITER_FILTER set, or | 2626 | * routine if @flag has FTRACE_ITER_FILTER set, or |
2614 | * ftrace_notrace_write() if @flag has FTRACE_ITER_NOTRACE set. | 2627 | * ftrace_notrace_write() if @flag has FTRACE_ITER_NOTRACE set. |
2615 | * ftrace_regex_lseek() should be used as the lseek routine, and | 2628 | * ftrace_filter_lseek() should be used as the lseek routine, and |
2616 | * release must call ftrace_regex_release(). | 2629 | * release must call ftrace_regex_release(). |
2617 | */ | 2630 | */ |
2618 | int | 2631 | int |
@@ -2696,19 +2709,6 @@ ftrace_notrace_open(struct inode *inode, struct file *file) | |||
2696 | inode, file); | 2709 | inode, file); |
2697 | } | 2710 | } |
2698 | 2711 | ||
2699 | loff_t | ||
2700 | ftrace_filter_lseek(struct file *file, loff_t offset, int whence) | ||
2701 | { | ||
2702 | loff_t ret; | ||
2703 | |||
2704 | if (file->f_mode & FMODE_READ) | ||
2705 | ret = seq_lseek(file, offset, whence); | ||
2706 | else | ||
2707 | file->f_pos = ret = 1; | ||
2708 | |||
2709 | return ret; | ||
2710 | } | ||
2711 | |||
2712 | static int ftrace_match(char *str, char *regex, int len, int type) | 2712 | static int ftrace_match(char *str, char *regex, int len, int type) |
2713 | { | 2713 | { |
2714 | int matched = 0; | 2714 | int matched = 0; |