[Devel] [PATCH RHEL7 v17 13/13] cgroup: reuse css_cgroup_from_root where appropriate

Valeriy Vdovin valeriy.vdovin at virtuozzo.com
Wed Apr 22 20:01:04 MSK 2020


Signed-off-by: Valeriy Vdovin <valeriy.vdovin at virtuozzo.com>
---
 kernel/cgroup.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/kernel/cgroup.c b/kernel/cgroup.c
index f271143..8b993e8 100644
--- a/kernel/cgroup.c
+++ b/kernel/cgroup.c
@@ -1099,7 +1099,7 @@ static int cgroup_show_options(struct seq_file *seq, struct dentry *dentry)
 	struct ve_struct *ve = get_exec_env();
 	if (!ve_is_super(ve)) {
 		mutex_lock(&cgroup_mutex);
-		root_cgrp = task_cgroup_from_root(ve->init_task, root);
+		root_cgrp = css_cgroup_from_root(ve->root_css_set, root);
 		mutex_unlock(&cgroup_mutex);
 	}
 #endif
@@ -4356,7 +4356,7 @@ int cgroup_mark_ve_roots(struct ve_struct *ve)
 	mutex_lock(&cgroup_cft_mutex);
 	mutex_lock(&cgroup_mutex);
 	for_each_active_root(root) {
-		cgrp = task_cgroup_from_root(ve->init_task, root);
+		cgrp = css_cgroup_from_root(ve->root_css_set, root);
 		rcu_assign_pointer(cgrp->ve_owner, ve);
 		set_bit(CGRP_VE_ROOT, &cgrp->flags);
 		dget(cgrp->dentry);
-- 
1.8.3.1



More information about the Devel mailing list