Commit 1815775e authored by Wei Yang's avatar Wei Yang Committed by Tejun Heo

cgroup: return early if it is already on preloaded list

If a cset is already on preloaded list, this means we have already setup
this cset properly for migration.

This patch just relocates the root cgrp lookup which isn't used anyway
when the cset is already on the preloaded list.

[tj@kernel.org: rephrase the commit log]
Signed-off-by: default avatarWei Yang <richard.weiyang@gmail.com>
Signed-off-by: default avatarTejun Heo <tj@kernel.org>
parent 1f1562fc
...@@ -2650,11 +2650,11 @@ void cgroup_migrate_add_src(struct css_set *src_cset, ...@@ -2650,11 +2650,11 @@ void cgroup_migrate_add_src(struct css_set *src_cset,
if (src_cset->dead) if (src_cset->dead)
return; return;
src_cgrp = cset_cgroup_from_root(src_cset, dst_cgrp->root);
if (!list_empty(&src_cset->mg_preload_node)) if (!list_empty(&src_cset->mg_preload_node))
return; return;
src_cgrp = cset_cgroup_from_root(src_cset, dst_cgrp->root);
WARN_ON(src_cset->mg_src_cgrp); WARN_ON(src_cset->mg_src_cgrp);
WARN_ON(src_cset->mg_dst_cgrp); WARN_ON(src_cset->mg_dst_cgrp);
WARN_ON(!list_empty(&src_cset->mg_tasks)); WARN_ON(!list_empty(&src_cset->mg_tasks));
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment