[Devel] [PATCH RHEL7 v14 12/12] cgroup: reuse css_cgroup_from_root where appropriate
Valeriy Vdovin
valeriy.vdovin at virtuozzo.com
Tue Apr 21 15:53:49 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 006319f..f40e8f24 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);
--
1.8.3.1
More information about the Devel
mailing list