[Devel] Re: [PATCH] cgroups: forbid noprefix if mounting more than just cpuset subsystem
Li Zefan
lizf at cn.fujitsu.com
Mon Jun 1 23:43:39 PDT 2009
>> + /* 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 at 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 at 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
_______________________________________________
Containers mailing list
Containers at lists.linux-foundation.org
https://lists.linux-foundation.org/mailman/listinfo/containers
More information about the Devel
mailing list