summaryrefslogtreecommitdiffstats
path: root/kernel/cgroup.c
diff options
context:
space:
mode:
authorTejun Heo <tj@kernel.org>2016-02-23 16:00:51 +0100
committerTejun Heo <tj@kernel.org>2016-02-23 16:00:51 +0100
commit62716ea0f2ea4253984008fd4a96a532674ac58f (patch)
treec3bbb24ec9952ac9c549b798c3394de3a7c4a246 /kernel/cgroup.c
parentcgroup: make css_tryget_online_from_dir() also recognize cgroup2 fs (diff)
downloadlinux-62716ea0f2ea4253984008fd4a96a532674ac58f.tar.xz
linux-62716ea0f2ea4253984008fd4a96a532674ac58f.zip
cgroup: use ->subtree_control when testing no internal process rule
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>
Diffstat (limited to 'kernel/cgroup.c')
-rw-r--r--kernel/cgroup.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/kernel/cgroup.c b/kernel/cgroup.c
index 2b114368666c..ac5451e7c458 100644
--- a/kernel/cgroup.c
+++ b/kernel/cgroup.c
@@ -2527,11 +2527,11 @@ static int cgroup_migrate_prepare_dst(struct cgroup *dst_cgrp,
lockdep_assert_held(&cgroup_mutex);
/*
- * Except for the root, subtree_ss_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->subtree_ss_mask)
+ dst_cgrp->subtree_control)
return -EBUSY;
/* look up the dst cset for each src cset and link it to src */