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

Commit 13d82fb7 authored by Tejun Heo's avatar Tejun Heo
Browse files

cgroup: short-circuit cset_cgroup_from_root() on the default hierarchy



Each css_set directly points to the default cgroup it belongs to, so
there's no reason to walk the cgrp_links list on the default
hierarchy.

Signed-off-by: default avatarTejun Heo <tj@kernel.org>
parent 5a621e6c
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -1311,6 +1311,8 @@ static struct cgroup *cset_cgroup_from_root(struct css_set *cset,

	if (cset == &init_css_set) {
		res = &root->cgrp;
	} else if (root == &cgrp_dfl_root) {
		res = cset->dfl_cgrp;
	} else {
		struct cgrp_cset_link *link;