public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Li Zefan <lizf@cn.fujitsu.com>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: Paul Menage <menage@google.com>,
	KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>,
	Balbir Singh <balbir@linux.vnet.ibm.com>,
	Dhaval Giani <dhaval@linux.vnet.ibm.com>,
	LKML <linux-kernel@vger.kernel.org>,
	Linux Containers <containers@lists.linux-foundation.org>
Subject: Re: [PATCH] cgroups: forbid noprefix if mounting more than just cpuset subsystem
Date: Tue, 02 Jun 2009 14:43:39 +0800	[thread overview]
Message-ID: <4A24CA1B.5020604@cn.fujitsu.com> (raw)
In-Reply-To: <20090601230251.57411c83.akpm@linux-foundation.org>

>> +	/* We allow noprefix only if mounting just the cpuset subsystem */
>> +	if (test_bit(ROOT_NOPREFIX, &opts->flags) &&
>> +	    (opts->subsys_bits & mask))
>> +		return -EINVAL;
>> +
> 
> uh, OK.  I hope that comment is clear enough for anyone who wants to
> understand it.   It doesn't explain _why_ this is done..
> 

I agree more explanation is better..

====

From: Li Zefan <lizf@cn.fujitsu.com>
Subject: [PATCH] cgroups: forbid noprefix if mounting more than just cpuset subsystem, fix2

Explain more on the noprefix option.

Signed-off-by: Li Zefan <lizf@cn.fujitsu.com>
---
 kernel/cgroup.c |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)

diff --git a/kernel/cgroup.c b/kernel/cgroup.c
index ad17f9d..d15432c 100644
--- a/kernel/cgroup.c
+++ b/kernel/cgroup.c
@@ -891,7 +891,11 @@ static int parse_cgroupfs_options(char *data,
 		}
 	}
 
-	/* We allow noprefix only if mounting just the cpuset subsystem */
+	/*
+	 * Option noprefix was introduced just for backward compatibility
+	 * with the old cpuset, so we allow noprefix only if mounting just
+	 * the cpuset subsystem.
+	 */
 	if (test_bit(ROOT_NOPREFIX, &opts->flags) &&
 	    (opts->subsys_bits & mask))
 		return -EINVAL;
-- 
1.5.4.rc3



  reply	other threads:[~2009-06-02  6:42 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-06-02  2:40 [PATCH] cgroups: forbid noprefix if mounting more than just cpuset subsystem Li Zefan
2009-06-02  6:02 ` Andrew Morton
2009-06-02  6:43   ` Li Zefan [this message]
2009-06-02  7:59 ` Paul Menage

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=4A24CA1B.5020604@cn.fujitsu.com \
    --to=lizf@cn.fujitsu.com \
    --cc=akpm@linux-foundation.org \
    --cc=balbir@linux.vnet.ibm.com \
    --cc=containers@lists.linux-foundation.org \
    --cc=dhaval@linux.vnet.ibm.com \
    --cc=kamezawa.hiroyu@jp.fujitsu.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=menage@google.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