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>
This commit is contained in:
parent
da0c9ea146
commit
61e867fde2
@ -1374,6 +1374,8 @@ current_cgns_cgroup_from_root(struct cgroup_root *root)
|
|||||||
cset = current->nsproxy->cgroup_ns->root_cset;
|
cset = current->nsproxy->cgroup_ns->root_cset;
|
||||||
if (cset == &init_css_set) {
|
if (cset == &init_css_set) {
|
||||||
res = &root->cgrp;
|
res = &root->cgrp;
|
||||||
|
} else if (root == &cgrp_dfl_root) {
|
||||||
|
res = cset->dfl_cgrp;
|
||||||
} else {
|
} else {
|
||||||
struct cgrp_cset_link *link;
|
struct cgrp_cset_link *link;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user