diff options
author | Miaohe Lin <linmiaohe@huawei.com> | 2019-09-29 11:06:58 +0300 |
---|---|---|
committer | Tejun Heo <tj@kernel.org> | 2019-10-07 17:01:09 +0300 |
commit | 61e867fde21ea94f2166899f24f16cad85cc7b24 (patch) | |
tree | e605042ea7666a1c90fa01fb9e353bbfc32d926c /kernel/cgroup | |
parent | da0c9ea146cbe92b832f1b0f694840ea8eb33cce (diff) | |
download | linux-61e867fde21ea94f2166899f24f16cad85cc7b24.tar.xz |
cgroup: short-circuit current_cgns_cgroup_from_root() on the default hierarchy
Like commit 13d82fb77abb ("cgroup: short-circuit cset_cgroup_from_root() on
the default hierarchy"), short-circuit current_cgns_cgroup_from_root() on
the default hierarchy.
Signed-off-by: Miaohe Lin <linmiaohe@huawei.com>
Signed-off-by: Tejun Heo <tj@kernel.org>
Diffstat (limited to 'kernel/cgroup')
-rw-r--r-- | kernel/cgroup/cgroup.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/kernel/cgroup/cgroup.c b/kernel/cgroup/cgroup.c index 080561bb8a4b..f6cba23290a1 100644 --- a/kernel/cgroup/cgroup.c +++ b/kernel/cgroup/cgroup.c @@ -1374,6 +1374,8 @@ current_cgns_cgroup_from_root(struct cgroup_root *root) cset = current->nsproxy->cgroup_ns->root_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; |