[RFC 4/4] cgroup: re-use the parent pointer in cgroup_destroy_locked()

From: Roman Gushchin
Date: Wed Aug 02 2017 - 12:59:39 EST


As we already have a pointer to the parent cgroup in
cgroup_destroy_locked(), we don't need to calculate it again
to pass as an argument for cgroup1_check_for_release().

Signed-off-by: Roman Gushchin <guro@xxxxxx>
Suggested-by: Tejun Heo <tj@xxxxxxxxxx>
Cc: Tejun Heo <tj@xxxxxxxxxx>
Cc: Zefan Li <lizefan@xxxxxxxxxx>
Cc: Waiman Long <longman@xxxxxxxxxx>
Cc: Johannes Weiner <hannes@xxxxxxxxxxx>
Cc: kernel-team@xxxxxx
Cc: linux-kernel@xxxxxxxxxxxxxxx
---
kernel/cgroup/cgroup.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/kernel/cgroup/cgroup.c b/kernel/cgroup/cgroup.c
index f58e1fe8bebd..2d9de4ec7727 100644
--- a/kernel/cgroup/cgroup.c
+++ b/kernel/cgroup/cgroup.c
@@ -5022,7 +5022,7 @@ static int cgroup_destroy_locked(struct cgroup *cgrp)
tcgrp->nr_dying_descendants++;
}

- cgroup1_check_for_release(cgroup_parent(cgrp));
+ cgroup1_check_for_release(parent);

/* put the base reference */
percpu_ref_kill(&cgrp->self.refcnt);
--
2.13.3