diff options
Diffstat (limited to 'kernel/trace')
-rw-r--r-- | kernel/trace/ftrace.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/kernel/trace/ftrace.c b/kernel/trace/ftrace.c index ee24fa1935ac..666880d051ef 100644 --- a/kernel/trace/ftrace.c +++ b/kernel/trace/ftrace.c | |||
@@ -2413,14 +2413,16 @@ ftrace_regex_release(struct inode *inode, struct file *file, int enable) | |||
2413 | ftrace_match_records(parser->buffer, parser->idx, enable); | 2413 | ftrace_match_records(parser->buffer, parser->idx, enable); |
2414 | } | 2414 | } |
2415 | 2415 | ||
2416 | mutex_lock(&ftrace_lock); | ||
2417 | if (ftrace_start_up && ftrace_enabled) | ||
2418 | ftrace_run_update_code(FTRACE_ENABLE_CALLS); | ||
2419 | mutex_unlock(&ftrace_lock); | ||
2420 | |||
2421 | trace_parser_put(parser); | 2416 | trace_parser_put(parser); |
2422 | kfree(iter); | 2417 | kfree(iter); |
2423 | 2418 | ||
2419 | if (file->f_mode & FMODE_WRITE) { | ||
2420 | mutex_lock(&ftrace_lock); | ||
2421 | if (ftrace_start_up && ftrace_enabled) | ||
2422 | ftrace_run_update_code(FTRACE_ENABLE_CALLS); | ||
2423 | mutex_unlock(&ftrace_lock); | ||
2424 | } | ||
2425 | |||
2424 | mutex_unlock(&ftrace_regex_lock); | 2426 | mutex_unlock(&ftrace_regex_lock); |
2425 | return 0; | 2427 | return 0; |
2426 | } | 2428 | } |