cgroup: disallow xattr, release_agent and name if sane_behavior

Disallow more mount options if sane_behavior.  Note that xattr used to
generate warning.

While at it, simplify option check in cgroup_mount() and update
sane_behavior comment in cgroup.h.

Signed-off-by: Tejun Heo <tj@kernel.org>
Acked-by: Li Zefan <lizefan@huawei.com>
This commit is contained in:
Tejun Heo
2014-02-13 06:58:38 -05:00
parent a755180bab
commit d3ba07c3aa
2 changed files with 7 additions and 13 deletions
+3 -3
View File
@@ -227,8 +227,8 @@ enum {
*
* The followings are the behaviors currently affected this flag.
*
* - Mount options "noprefix" and "clone_children" are disallowed.
* Also, cgroupfs file cgroup.clone_children is not created.
* - Mount options "noprefix", "xattr", "clone_children",
* "release_agent" and "name" are disallowed.
*
* - When mounting an existing superblock, mount options should
* match.
@@ -246,7 +246,7 @@ enum {
* - "release_agent" and "notify_on_release" are removed.
* Replacement notification mechanism will be implemented.
*
* - "xattr" mount option is deprecated. kernfs always enables it.
* - "cgroup.clone_children" is removed.
*
* - cpuset: tasks will be kept in empty cpusets when hotplug happens
* and take masks of ancestors with non-empty cpus/mems, instead of