From: Roman Gushchin Date: Wed, 2 Aug 2017 16:55:32 +0000 (+0100) Subject: cgroup: re-use the parent pointer in cgroup_destroy_locked() X-Git-Tag: v4.14-rc1~123^2~5 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=5a621e6c958e057c727a30c502f28bf2bc04adfd;p=thirdparty%2Flinux.git cgroup: re-use the parent pointer in cgroup_destroy_locked() 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 Suggested-by: Tejun Heo Signed-off-by: Tejun Heo Cc: Zefan Li Cc: Waiman Long Cc: Johannes Weiner Cc: kernel-team@fb.com Cc: linux-kernel@vger.kernel.org --- diff --git a/kernel/cgroup/cgroup.c b/kernel/cgroup/cgroup.c index a06755a610e13..92e5997962208 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);