cgroup: make interface file "cgroup.sane_behavior" legacy-only
authorTejun Heo <tj@kernel.org>
Wed, 9 Jul 2014 14:08:08 +0000 (10:08 -0400)
committerTejun Heo <tj@kernel.org>
Wed, 9 Jul 2014 14:08:08 +0000 (10:08 -0400)
"cgroup.sane_behavior" is added to help distinguishing whether
sane_behavior is in effect or not.  We now have the default hierarchy
where the flag is always in effect and are planning to remove
supporting sane behavior on the legacy hierarchies making this file on
the default hierarchy rather pointless.  Let's make it legacy only and
thus always zero.

Signed-off-by: Tejun Heo <tj@kernel.org>
Acked-by: Li Zefan <lizefan@huawei.com>
kernel/cgroup.c

index 5411fffa4b7057b12fb425970ff130ea7f44d9cb..0ea54af6b1333a21b3a03047af60525649f67e97 100644 (file)
@@ -2470,9 +2470,7 @@ static int cgroup_release_agent_show(struct seq_file *seq, void *v)
 
 static int cgroup_sane_behavior_show(struct seq_file *seq, void *v)
 {
-       struct cgroup *cgrp = seq_css(seq)->cgroup;
-
-       seq_printf(seq, "%d\n", cgroup_sane_behavior(cgrp));
+       seq_puts(seq, "0\n");
        return 0;
 }
 
@@ -4126,7 +4124,7 @@ static struct cftype cgroup_base_files[] = {
        },
        {
                .name = "cgroup.sane_behavior",
-               .flags = CFTYPE_ONLY_ON_ROOT,
+               .flags = CFTYPE_INSANE | CFTYPE_ONLY_ON_ROOT,
                .seq_show = cgroup_sane_behavior_show,
        },
        {
This page took 0.028563 seconds and 5 git commands to generate.