Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1303965
| From | Tejun Heo <tj@kernel.org> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH 4/6] cgroup: use ->subtree_control when testing no internal process rule |
| Date | 2016-01-07 23:40 +0100 |
| Message-ID | <qOrnR-63O-45@gated-at.bofh.it> (permalink) |
| References | <qOrnQ-63O-21@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
No internal process rule is enforced by cgroup_migrate_prepare_dst() during process migration. It tests whether the target cgroup's ->child_subsys_mask is zero which is different from "subtree_control" write path which tests ->subtree_control. This hasn't mattered because up until now, both ->child_subsys_mask and ->subtree_control are zero or non-zero at the same time. However, with the planned addition of implicit controllers, this will no longer be true. This patch prepares for the change by making cgorup_migrate_prepare_dst() test ->subtree_control instead. Signed-off-by: Tejun Heo <tj@kernel.org> --- kernel/cgroup.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/kernel/cgroup.c b/kernel/cgroup.c index 8a92043..8bc83fd 100644 --- a/kernel/cgroup.c +++ b/kernel/cgroup.c @@ -2512,11 +2512,11 @@ static int cgroup_migrate_prepare_dst(struct cgroup *dst_cgrp, lockdep_assert_held(&cgroup_mutex); /* - * Except for the root, child_subsys_mask must be zero for a cgroup + * Except for the root, subtree_control must be zero for a cgroup * with tasks so that child cgroups don't compete against tasks. */ if (dst_cgrp && cgroup_on_dfl(dst_cgrp) && cgroup_parent(dst_cgrp) && - dst_cgrp->child_subsys_mask) + dst_cgrp->subtree_control) return -EBUSY; /* look up the dst cset for each src cset and link it to src */ -- 2.5.0
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCHSET] cgroup, perf_event: make perf_event work on v2 hierarchy Tejun Heo <tj@kernel.org> - 2016-01-07 23:40 +0100 [PATCH 2/6] cgroup: convert cgroup_subsys flag fields to bool bitfields Tejun Heo <tj@kernel.org> - 2016-01-07 23:40 +0100 [PATCH 1/6] cgroup: s/cgrp_dfl_root_/cgrp_dfl_/ Tejun Heo <tj@kernel.org> - 2016-01-07 23:40 +0100 [PATCH 3/6] cgroup: make css_tryget_online_from_dir() also recognize cgroup2 fs Tejun Heo <tj@kernel.org> - 2016-01-07 23:40 +0100 [PATCH 6/6] cgroup, perf_event: make perf_event controller work on cgroup2 hierarchy Tejun Heo <tj@kernel.org> - 2016-01-07 23:40 +0100 [PATCH 4/6] cgroup: use ->subtree_control when testing no internal process rule Tejun Heo <tj@kernel.org> - 2016-01-07 23:40 +0100 [PATCH 5/6] cgroup: implement cgroup_subsys->implicit_on_dfl Tejun Heo <tj@kernel.org> - 2016-01-07 23:40 +0100
csiph-web