Skip to content

Commit

Permalink
cgroup: re-use the parent pointer in cgroup_destroy_locked()
Browse files Browse the repository at this point in the history
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@fb.com>
Suggested-by: Tejun Heo <tj@kernel.org>
Signed-off-by: Tejun 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
  • Loading branch information
Roman Gushchin authored and Tejun Heo committed Aug 2, 2017
1 parent ec39225 commit 5a621e6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion kernel/cgroup/cgroup.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 5a621e6

Please sign in to comment.