Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 5a621e6c authored by Roman Gushchin's avatar Roman Gushchin Committed by Tejun Heo
Browse files

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: default avatarRoman Gushchin <guro@fb.com>
Suggested-by: default avatarTejun Heo <tj@kernel.org>
Signed-off-by: default avatarTejun Heo <tj@kernel.org>
Cc: Zefan Li <lizefan@huawei.com>
Cc: Waiman Long <longman@redhat.com>
Cc: Johannes Weiner <hannes@cmpxchg.org>
Cc: kernel-team@fb.com
Cc: linux-kernel@vger.kernel.org
parent ec39225c
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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);