[PATCH v2 2/2] tracing: Reset ftrace_graph_filter_enabled if count is zero

From: Namhyung Kim
Date: Thu Apr 11 2013 - 03:02:16 EST


From: Namhyung Kim <namhyung.kim@xxxxxxx>

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

Signed-off-by: Namhyung Kim <namhyung@xxxxxxxxxx>
---
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 be2bcb7ab2f7..daf8df20b764 100644
--- a/kernel/trace/ftrace.c
+++ b/kernel/trace/ftrace.c
@@ -3779,7 +3779,8 @@ out:
if (fail)
return -EINVAL;

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

--
1.7.11.7

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/