Skip to content

Commit c1d5d42

Browse files
committed
cgroup: make interface file "cgroup.sane_behavior" legacy-only
"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>
1 parent 7450e90 commit c1d5d42

1 file changed

Lines changed: 2 additions & 4 deletions

File tree

‎kernel/cgroup.c‎

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2470,9 +2470,7 @@ static int cgroup_release_agent_show(struct seq_file *seq, void *v)
24702470

24712471
static int cgroup_sane_behavior_show(struct seq_file *seq, void *v)
24722472
{
2473-
struct cgroup *cgrp = seq_css(seq)->cgroup;
2474-
2475-
seq_printf(seq, "%d\n", cgroup_sane_behavior(cgrp));
2473+
seq_puts(seq, "0\n");
24762474
return 0;
24772475
}
24782476

@@ -4126,7 +4124,7 @@ static struct cftype cgroup_base_files[] = {
41264124
},
41274125
{
41284126
.name = "cgroup.sane_behavior",
4129-
.flags = CFTYPE_ONLY_ON_ROOT,
4127+
.flags = CFTYPE_INSANE | CFTYPE_ONLY_ON_ROOT,
41304128
.seq_show = cgroup_sane_behavior_show,
41314129
},
41324130
{

0 commit comments

Comments
 (0)