[ 034/136 ] tracing: Reset ftrace_graph_filter_enabled if count is zero

Steven Rostedt
2013-05-18T02:20:49Z

[-- Attachment #1: 0034-tracing-Reset-ftrace_graph_filter_enabled-if-count-i.patch --]
[-- Type: text/plain, Size: 1052 bytes --]

3.6.11.4 stable review patch.
If anyone has any objections, please let me know.

------------------

From: Namhyung Kim <namhyung.kim@lge.com>

[ Upstream commit 9f50afccfdc15d95d7331acddcb0f7703df089ae ]

The ftrace_graph_count can be decreased with a "!" pattern, so that
the enabled flag should be updated too.

Link: http://lkml.kernel.org/r/1365663698-2413-1-git-send-email-namhyung@kernel.org

Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: Namhyung Kim <namhyung.kim@lge.com>
Cc: stable@vger.kernel.org
Signed-off-by: Namhyung Kim <namhyung@kernel.org>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
---
kernel/trace/ftrace.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/kernel/trace/ftrace.c b/kernel/trace/ftrace.c
index f8cef7f..09657d7 100644
--- a/kernel/trace/ftrace.c
+++ b/kernel/trace/ftrace.c
@@ -3579,7 +3579,8 @@ out:
if (fail)
return -EINVAL;

- ftrace_graph_filter_enabled = 1;
+ ftrace_graph_filter_enabled = !!(*idx);
+
return 0;
}

--
1.7.10.4