From: Tejun Heo Date: Wed, 2 Aug 2017 22:39:38 +0000 (-0700) Subject: cgroup: short-circuit cset_cgroup_from_root() on the default hierarchy X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=13d82fb77abb9625f3ca74f5c4cbedde0f412f01;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git 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: Tejun Heo --- diff --git a/kernel/cgroup/cgroup.c b/kernel/cgroup/cgroup.c index 92e599796220..f5ca55db1fe1 100644 --- a/kernel/cgroup/cgroup.c +++ b/kernel/cgroup/cgroup.c @@ -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;