Skip to contentSkip to conversation

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

PATCH Applied Miaohe Lin 2 participants 2 messages Sep 29, 2019 – Oct 7, 2019 cgroup

lore
Share & tools
lore

Miaohe Lin

author
#0 lore raw

PATCH 1/1 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.

---
 kernel/cgroup/cgroup.c | 2 ++
 1 file changed, 2 insertions(+)
kernel/cgroup/cgroup.c +2 -0
index 8be1da1ebd9a..b90c8b200aa2 100644
@@ -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;
 
Signature · 1 line
2.21.GIT
maintainer Applied
#1 lore raw
Quoted 5 lines · Miaohe Lin

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.

Applied to cgroup/for-5.5.

Thanks.

Signature · 1 line
tejun