aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/cgroup.h
diff options
context:
space:
mode:
authorTejun Heo <tj@kernel.org>2013-06-27 19:37:26 -0700
committerTejun Heo <tj@kernel.org>2013-06-27 19:37:26 -0700
commit0ce6cba35777cf96a54ce0d5856dc962566b8717 (patch)
treec03ee20f1c6deff5494a4ca86802ea053c6d5667 /include/linux/cgroup.h
parentcgroup: fix deadlock on cgroup_mutex via drop_parsed_module_refcounts() (diff)
downloadlinux-dev-0ce6cba35777cf96a54ce0d5856dc962566b8717.tar.xz
linux-dev-0ce6cba35777cf96a54ce0d5856dc962566b8717.zip
cgroup: CGRP_ROOT_SUBSYS_BOUND should be ignored when comparing mount options
1672d04070 ("cgroup: fix cgroupfs_root early destruction path") introduced CGRP_ROOT_SUBSYS_BOUND which is used to mark completion of subsys binding on a new root; however, this broke remounts. cgroup_remount() doesn't allow changing root options via remount and CGRP_ROOT_SUBSYS_BOUND, which is set on all fully initialized roots, makes the function reject all remounts. Fix it by putting the options part in the lower 16 bits of root->flags and masking the comparions. While at it, make cgroup_remount() emit an error message explaining why it's rejecting a remount request, so that it's less of a mystery. Signed-off-by: Tejun Heo <tj@kernel.org>
Diffstat (limited to 'include/linux/cgroup.h')
-rw-r--r--include/linux/cgroup.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/include/linux/cgroup.h b/include/linux/cgroup.h
index ad3555bc21f4..8db53974f7b5 100644
--- a/include/linux/cgroup.h
+++ b/include/linux/cgroup.h
@@ -276,7 +276,11 @@ enum {
CGRP_ROOT_NOPREFIX = (1 << 1), /* mounted subsystems have no named prefix */
CGRP_ROOT_XATTR = (1 << 2), /* supports extended attributes */
- CGRP_ROOT_SUBSYS_BOUND = (1 << 3), /* subsystems finished binding */
+
+ /* mount options live below bit 16 */
+ CGRP_ROOT_OPTION_MASK = (1 << 16) - 1,
+
+ CGRP_ROOT_SUBSYS_BOUND = (1 << 16), /* subsystems finished binding */
};
/*