[RHEL7,v15,13/13] cgroup: reuse css_cgroup_from_root where appropriate

Submitted by Valeriy Vdovin on April 22, 2020, 11:18 a.m.

Details

Message ID 1587554319-780254-14-git-send-email-valeriy.vdovin@virtuozzo.com
State New
Series "Make release_agent per-cgroup property. Run release_agent in proper ve."
Headers show

Commit Message

Valeriy Vdovin April 22, 2020, 11:18 a.m.
Signed-off-by: Valeriy Vdovin <valeriy.vdovin@virtuozzo.com>
---
 kernel/cgroup.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Patch hide | download patch | download mbox

diff --git a/kernel/cgroup.c b/kernel/cgroup.c
index 98cab92..c3c436c 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
@@ -4337,7 +4337,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);