]> git.baikalelectronics.ru Git - kernel.git/commit
cgroup: CGRP_ROOT_SUBSYS_BOUND should be ignored when comparing mount options
authorTejun Heo <tj@kernel.org>
Fri, 28 Jun 2013 02:37:26 +0000 (19:37 -0700)
committerTejun Heo <tj@kernel.org>
Fri, 28 Jun 2013 02:37:26 +0000 (19:37 -0700)
commit9b981557e177b3c658d6136c08a7a86b76bcc194
treec03ee20f1c6deff5494a4ca86802ea053c6d5667
parent67ae49cb966f4f20b1eb151efa6aa23bde202fc0
cgroup: CGRP_ROOT_SUBSYS_BOUND should be ignored when comparing mount options

2104dd3ac4 ("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>
include/linux/cgroup.h
kernel/cgroup.c