Skip to content

Commit

Permalink
cgroup: remove extra cgroup_migrate_finish() call
Browse files Browse the repository at this point in the history
The callers of cgroup_migrate_prepare_dst() correctly call
cgroup_migrate_finish() for success and failure cases both. No need to
call it in cgroup_migrate_prepare_dst() in failure case.

Signed-off-by: Shakeel Butt <shakeelb@google.com>
Reviewed-by: Daniel Jordan <daniel.m.jordan@oracle.com>
Signed-off-by: Tejun Heo <tj@kernel.org>
  • Loading branch information
Shakeel Butt authored and Tejun Heo committed Apr 4, 2019
1 parent 145f47c commit d6e486e
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions kernel/cgroup/cgroup.c
Original file line number Diff line number Diff line change
Expand Up @@ -2602,7 +2602,7 @@ int cgroup_migrate_prepare_dst(struct cgroup_mgctx *mgctx)

dst_cset = find_css_set(src_cset, src_cset->mg_dst_cgrp);
if (!dst_cset)
goto err;
return -ENOMEM;

WARN_ON_ONCE(src_cset->mg_dst_cset || dst_cset->mg_dst_cset);

Expand Down Expand Up @@ -2634,9 +2634,6 @@ int cgroup_migrate_prepare_dst(struct cgroup_mgctx *mgctx)
}

return 0;
err:
cgroup_migrate_finish(mgctx);
return -ENOMEM;
}

/**
Expand Down

0 comments on commit d6e486e

Please sign in to comment.