* [PATCH] cgroup: remove extra cgroup_migrate_finish() call
@ 2019-04-03 23:03 Shakeel Butt
2019-04-04 18:30 ` Daniel Jordan
2019-04-04 20:41 ` Tejun Heo
0 siblings, 2 replies; 3+ messages in thread
From: Shakeel Butt @ 2019-04-03 23:03 UTC (permalink / raw)
To: Johannes Weiner, Tejun Heo, Li Zefan; +Cc: cgroups, linux-kernel, Shakeel Butt
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>
---
kernel/cgroup/cgroup.c | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/kernel/cgroup/cgroup.c b/kernel/cgroup/cgroup.c
index 3f2b4bde0f9c..f219c195a9a5 100644
--- a/kernel/cgroup/cgroup.c
+++ b/kernel/cgroup/cgroup.c
@@ -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);
@@ -2634,9 +2634,6 @@ int cgroup_migrate_prepare_dst(struct cgroup_mgctx *mgctx)
}
return 0;
-err:
- cgroup_migrate_finish(mgctx);
- return -ENOMEM;
}
/**
--
2.21.0.392.gf8f6787159e-goog
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] cgroup: remove extra cgroup_migrate_finish() call
2019-04-03 23:03 [PATCH] cgroup: remove extra cgroup_migrate_finish() call Shakeel Butt
@ 2019-04-04 18:30 ` Daniel Jordan
2019-04-04 20:41 ` Tejun Heo
1 sibling, 0 replies; 3+ messages in thread
From: Daniel Jordan @ 2019-04-04 18:30 UTC (permalink / raw)
To: Shakeel Butt; +Cc: Johannes Weiner, Tejun Heo, Li Zefan, cgroups, linux-kernel
On Wed, Apr 03, 2019 at 04:03:54PM -0700, Shakeel Butt wrote:
> 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.
Calling cgroup_migrate_finish multiple times is a no-op, so thankfully it
wasn't causing any problems. Looks good to me.
Reviewed-by: Daniel Jordan <daniel.m.jordan@oracle.com>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] cgroup: remove extra cgroup_migrate_finish() call
2019-04-03 23:03 [PATCH] cgroup: remove extra cgroup_migrate_finish() call Shakeel Butt
2019-04-04 18:30 ` Daniel Jordan
@ 2019-04-04 20:41 ` Tejun Heo
1 sibling, 0 replies; 3+ messages in thread
From: Tejun Heo @ 2019-04-04 20:41 UTC (permalink / raw)
To: Shakeel Butt; +Cc: Johannes Weiner, Li Zefan, cgroups, linux-kernel
On Wed, Apr 03, 2019 at 04:03:54PM -0700, Shakeel Butt wrote:
> 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>
Applied to cgroup/for-5.2.
Thanks, Shakeel.
--
tejun
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2019-04-04 20:41 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-04-03 23:03 [PATCH] cgroup: remove extra cgroup_migrate_finish() call Shakeel Butt
2019-04-04 18:30 ` Daniel Jordan
2019-04-04 20:41 ` Tejun Heo
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.