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)
commit6c694c88255b2052d9922d62df6df7c9e152eeeb
tree9eacd31f55f9f513240739d04a3ee0bfd02cf5ff
parent58cdb1ceb15aab7b34719ad225ff023775d774e7
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