[Devel] [PATCH RH8 v2 1/4] kernel/cgroup: rename css_get_local_root

Andrey Zhadchenko andrey.zhadchenko at virtuozzo.com
Fri Jul 9 02:23:09 MSK 2021


css functions with _get_ wording usually take reference counters.
Rename to css_local_root() to comply. Change all uses accordingly.

https://jira.sw.ru/browse/PSBM-131253
Signed-off-by: Andrey Zhadchenko <andrey.zhadchenko at virtuozzo.com>
---
 include/linux/cgroup.h   | 2 +-
 kernel/cgroup/cgroup.c   | 2 +-
 security/device_cgroup.c | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/include/linux/cgroup.h b/include/linux/cgroup.h
index 7cf6e1e..1223bc8 100644
--- a/include/linux/cgroup.h
+++ b/include/linux/cgroup.h
@@ -874,7 +874,7 @@ int cgroup_path_ns(struct cgroup *cgrp, char *buf, size_t buflen,
 #ifdef CONFIG_VE
 int cgroup_mark_ve_roots(struct ve_struct *ve);
 void cgroup_unmark_ve_roots(struct ve_struct *ve);
-struct cgroup_subsys_state *css_get_local_root(struct cgroup_subsys_state *css);
+struct cgroup_subsys_state *css_local_root(struct cgroup_subsys_state *css);
 struct ve_struct *cgroup_get_ve_owner(struct cgroup *cgrp);
 #endif
 
diff --git a/kernel/cgroup/cgroup.c b/kernel/cgroup/cgroup.c
index 1bc15fb..57ff462c 100644
--- a/kernel/cgroup/cgroup.c
+++ b/kernel/cgroup/cgroup.c
@@ -329,7 +329,7 @@ struct cgroup *cgroup_get_local_root(struct cgroup *cgrp)
 	return cgrp;
 }
 
-struct cgroup_subsys_state *css_get_local_root(struct cgroup_subsys_state *css)
+struct cgroup_subsys_state *css_local_root(struct cgroup_subsys_state *css)
 {
 	/*
 	 * Find css for nearest "root" cgroup, which might be
diff --git a/security/device_cgroup.c b/security/device_cgroup.c
index 98bbd95..5b64765 100644
--- a/security/device_cgroup.c
+++ b/security/device_cgroup.c
@@ -328,7 +328,7 @@ static int devcgroup_seq_show(struct seq_file *m, void *v)
 		 * as in ve root cgroup - show as if we allow everyting
 		 */
 		if (!ve_is_super(get_exec_env())) {
-			root_css  = css_get_local_root(seq_css(m));
+			root_css  = css_local_root(seq_css(m));
 			root_cgrp = css_to_devcgroup(root_css);
 
 			if (dev_exceptions_equal(&devcgroup->exceptions,
-- 
1.8.3.1



More information about the Devel mailing list