[v9,3/9] cgroup: declared cgroup_mark_ve_root in public header

Submitted by Valeriy Vdovin on April 16, 2020, 3:09 p.m.

Details

Message ID 1587049785-68528-4-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 16, 2020, 3:09 p.m.
Signed-off-by: Valeriy Vdovin <valeriy.vdovin@virtuozzo.com>
---
 include/linux/cgroup.h | 4 ++++
 kernel/cgroup.c        | 2 +-
 kernel/ve/ve.c         | 4 +---
 3 files changed, 6 insertions(+), 4 deletions(-)

Patch hide | download patch | download mbox

diff --git a/include/linux/cgroup.h b/include/linux/cgroup.h
index d671309..0239518 100644
--- a/include/linux/cgroup.h
+++ b/include/linux/cgroup.h
@@ -614,6 +614,10 @@  int cgroup_path_ve(const struct cgroup *cgrp, char *buf, int buflen);
 
 int cgroup_task_count(const struct cgroup *cgrp);
 
+#ifdef CONFIG_VE
+void cgroup_mark_ve_roots(struct ve_struct *ve);
+#endif
+
 /*
  * Control Group taskset, used to pass around set of tasks to cgroup_subsys
  * methods.
diff --git a/kernel/cgroup.c b/kernel/cgroup.c
index 1f799a8..9ea5b51 100644
--- a/kernel/cgroup.c
+++ b/kernel/cgroup.c
@@ -4239,7 +4239,7 @@  static int subgroups_count(struct cgroup *cgroup)
 }
 
 #ifdef CONFIG_VE
-void cgroup_mark_ve_root(struct ve_struct *ve)
+void cgroup_mark_ve_roots(struct ve_struct *ve)
 {
 	struct cgroup *cgrp;
 	struct cgroupfs_root *root;
diff --git a/kernel/ve/ve.c b/kernel/ve/ve.c
index 967258f..0f7392d 100644
--- a/kernel/ve/ve.c
+++ b/kernel/ve/ve.c
@@ -479,8 +479,6 @@  static void ve_drop_context(struct ve_struct *ve)
 
 static const struct timespec zero_time = { };
 
-extern void cgroup_mark_ve_root(struct ve_struct *ve);
-
 static int ve_workqueue_start(struct ve_struct *ve)
 {
 	ve->wq = alloc_workqueue("ve_wq_%s",
@@ -547,7 +545,7 @@  static int ve_start_container(struct ve_struct *ve)
 	if (err < 0)
 		goto err_iterate;
 
-	cgroup_mark_ve_root(ve);
+	cgroup_mark_ve_roots(ve);
 
 	ve->is_running = 1;
 

Comments

Kirill Tkhai April 16, 2020, 3:41 p.m.
On 16.04.2020 18:09, Valeriy Vdovin wrote:
> Signed-off-by: Valeriy Vdovin <valeriy.vdovin@virtuozzo.com>

You should add Reviewed-by tags on resend for already reviewed patches, in case of there are no changes.

Reviewed-by: Kirill Tkhai <ktkhai@virtuozzo.com>

> ---
>  include/linux/cgroup.h | 4 ++++
>  kernel/cgroup.c        | 2 +-
>  kernel/ve/ve.c         | 4 +---
>  3 files changed, 6 insertions(+), 4 deletions(-)
> 
> diff --git a/include/linux/cgroup.h b/include/linux/cgroup.h
> index d671309..0239518 100644
> --- a/include/linux/cgroup.h
> +++ b/include/linux/cgroup.h
> @@ -614,6 +614,10 @@ int cgroup_path_ve(const struct cgroup *cgrp, char *buf, int buflen);
>  
>  int cgroup_task_count(const struct cgroup *cgrp);
>  
> +#ifdef CONFIG_VE
> +void cgroup_mark_ve_roots(struct ve_struct *ve);
> +#endif
> +
>  /*
>   * Control Group taskset, used to pass around set of tasks to cgroup_subsys
>   * methods.
> diff --git a/kernel/cgroup.c b/kernel/cgroup.c
> index 1f799a8..9ea5b51 100644
> --- a/kernel/cgroup.c
> +++ b/kernel/cgroup.c
> @@ -4239,7 +4239,7 @@ static int subgroups_count(struct cgroup *cgroup)
>  }
>  
>  #ifdef CONFIG_VE
> -void cgroup_mark_ve_root(struct ve_struct *ve)
> +void cgroup_mark_ve_roots(struct ve_struct *ve)
>  {
>  	struct cgroup *cgrp;
>  	struct cgroupfs_root *root;
> diff --git a/kernel/ve/ve.c b/kernel/ve/ve.c
> index 967258f..0f7392d 100644
> --- a/kernel/ve/ve.c
> +++ b/kernel/ve/ve.c
> @@ -479,8 +479,6 @@ static void ve_drop_context(struct ve_struct *ve)
>  
>  static const struct timespec zero_time = { };
>  
> -extern void cgroup_mark_ve_root(struct ve_struct *ve);
> -
>  static int ve_workqueue_start(struct ve_struct *ve)
>  {
>  	ve->wq = alloc_workqueue("ve_wq_%s",
> @@ -547,7 +545,7 @@ static int ve_start_container(struct ve_struct *ve)
>  	if (err < 0)
>  		goto err_iterate;
>  
> -	cgroup_mark_ve_root(ve);
> +	cgroup_mark_ve_roots(ve);
>  
>  	ve->is_running = 1;
>  
>