From: Tejun Heo <tj@kernel.org>
To: lizefan@huawei.com
Cc: cgroups@vger.kernel.org, linux-kernel@vger.kernel.org,
	Tejun Heo <tj@kernel.org>
Subject: [PATCH 2/4] cgroup: make interface file "cgroup.sane_behavior" legacy-only
Date: Wed,  2 Jul 2014 19:45:45 -0400	[thread overview]
Message-ID: <1404344747-7957-3-git-send-email-tj@kernel.org> (raw)
In-Reply-To: <1404344747-7957-1-git-send-email-tj@kernel.org>
"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>
---
 kernel/cgroup.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/kernel/cgroup.c b/kernel/cgroup.c
index e27f4d4..be701d9 100644
--- a/kernel/cgroup.c
+++ b/kernel/cgroup.c
@@ -2414,9 +2414,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;
 }
 
@@ -4016,7 +4014,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,
 	},
 	{
-- 
1.9.3
next prev parent reply	other threads:[~2014-07-02 23:45 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-07-02 23:45 [PATCHSET cgroup/for-3.17] cgroup: remove sane_behavior support on non-default hierarchies Tejun Heo
2014-07-02 23:45 ` [PATCH 1/4] cgroup: remove CGRP_ROOT_OPTION_MASK Tejun Heo
2014-07-02 23:45 ` Tejun Heo [this message]
2014-07-02 23:45 ` [PATCH 3/4] cgroup: remove sane_behavior support on non-default hierarchies Tejun Heo
2014-07-08 19:57   ` Vivek Goyal
2014-07-02 23:45 ` [PATCH 4/4] cgroup: clean up sane_behavior handling Tejun Heo
2014-07-09  7:25 ` [PATCHSET cgroup/for-3.17] cgroup: remove sane_behavior support on non-default hierarchies Li Zefan
     [not found] ` <1404344747-7957-1-git-send-email-tj-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
2014-07-09 14:08   ` Tejun Heo
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox
  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):
  git send-email \
    --in-reply-to=1404344747-7957-3-git-send-email-tj@kernel.org \
    --to=tj@kernel.org \
    --cc=cgroups@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lizefan@huawei.com \
    /path/to/YOUR_REPLY
  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
  Be sure your reply has a Subject: header at the top and a blank line
  before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).