]> git.baikalelectronics.ru Git - kernel.git/commit
cgroup: move migration destination verification out of cgroup_migrate_prepare_dst()
authorTejun Heo <tj@kernel.org>
Tue, 8 Mar 2016 16:51:25 +0000 (11:51 -0500)
committerTejun Heo <tj@kernel.org>
Tue, 8 Mar 2016 16:51:25 +0000 (11:51 -0500)
commit4d5566a2bbb1a71b49499a289316a3b8c8a23c5e
tree9eacd31f55f9f513240739d04a3ee0bfd02cf5ff
parentc1ce13d64683ce899f36cbb974b6f44405217554
cgroup: move migration destination verification out of cgroup_migrate_prepare_dst()

cgroup_migrate_prepare_dst() verifies whether the destination cgroup
is allowable; however, the test doesn't really belong there.  It's too
deep and common in the stack and as a result the test itself is gated
by another test.

Separate the test out into cgroup_may_migrate_to() and update
cgroup_attach_task() and cgroup_transfer_tasks() to perform the test
directly.  This doesn't cause any behavior differences.

Signed-off-by: Tejun Heo <tj@kernel.org>
kernel/cgroup.c