[Devel] [PATCH RHEL9 COMMIT] ve/cgroup: fix cgroup_mark_ve_roots naming

Konstantin Khorenko khorenko at virtuozzo.com
Wed Oct 20 11:43:54 MSK 2021


The commit is pushed to "branch-rh9-5.14.vz9.1.x-ovz" and will appear at https://src.openvz.org/scm/ovz/vzkernel.git
after rh9-5.14.0-4.vz9.10.12
------>
commit 35c7c9bd5824f4e8383188ca6ff2e92806751696
Author: Pavel Tikhomirov <ptikhomirov at virtuozzo.com>
Date:   Wed Oct 20 11:43:53 2021 +0300

    ve/cgroup: fix cgroup_mark_ve_roots naming
    
    Let's use proper English, plural nouns should have -s ending. We mark
    roots for many container cgroups not for just one root. We already have
    -s in "cgroup_unmark_ve_roots", let's be consistent.
    
    https://jira.sw.ru/browse/PSBM-134002
    Fixes: 907c1e6cd67f ("cgroup: Mark cgroup CGRP_VE_ROOT")
    Signed-off-by: Pavel Tikhomirov <ptikhomirov at virtuozzo.com>
    
    Reviewed-by: Alexander Mikhalitsyn <alexander.mikhalitsyn at virtuozzo.com>
    Reviewed-by: Kirill Tkhai <ktkhai at virtuozzo.com>
---
 include/linux/cgroup.h | 2 +-
 kernel/cgroup/cgroup.c | 2 +-
 kernel/ve/ve.c         | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/include/linux/cgroup.h b/include/linux/cgroup.h
index 892362bde6b1..f4d9b0f44a43 100644
--- a/include/linux/cgroup.h
+++ b/include/linux/cgroup.h
@@ -887,7 +887,7 @@ int cgroup_path_ns(struct cgroup *cgrp, char *buf, size_t buflen,
 		   struct cgroup_namespace *ns);
 
 #ifdef CONFIG_VE
-extern int cgroup_mark_ve_root(struct ve_struct *ve);
+extern int cgroup_mark_ve_roots(struct ve_struct *ve);
 void cgroup_unmark_ve_roots(struct ve_struct *ve);
 struct ve_struct *cgroup_ve_owner(struct cgroup *cgrp);
 #endif
diff --git a/kernel/cgroup/cgroup.c b/kernel/cgroup/cgroup.c
index c08497c7eb5d..c64797ecd49a 100644
--- a/kernel/cgroup/cgroup.c
+++ b/kernel/cgroup/cgroup.c
@@ -2049,7 +2049,7 @@ static inline bool ve_check_root_cgroups(struct css_set *cset)
 	return false;
 }
 
-int cgroup_mark_ve_root(struct ve_struct *ve)
+int cgroup_mark_ve_roots(struct ve_struct *ve)
 {
 	struct cgrp_cset_link *link;
 	struct css_set *cset;
diff --git a/kernel/ve/ve.c b/kernel/ve/ve.c
index e41071873626..41f9e385bd28 100644
--- a/kernel/ve/ve.c
+++ b/kernel/ve/ve.c
@@ -510,7 +510,7 @@ static int ve_start_container(struct ve_struct *ve)
 	if (err < 0)
 		goto err_iterate;
 
-	err = cgroup_mark_ve_root(ve);
+	err = cgroup_mark_ve_roots(ve);
 	if (err)
 		goto err_mark_ve;
 


More information about the Devel mailing list