[Devel] [PATCH RHEL7 COMMIT] ve/cgroup: make cgroup_get_ve_root visible in kernel/sched/core.c
Konstantin Khorenko
khorenko at virtuozzo.com
Tue Nov 7 12:06:20 MSK 2017
The commit is pushed to "branch-rh7-3.10.0-693.1.1.vz7.37.x-ovz" and will appear at https://src.openvz.org/scm/ovz/vzkernel.git
after rh7-3.10.0-693.1.1.vz7.37.21
------>
commit 5fe025036ced8c46edc1316856df5617f3184a59
Author: Pavel Tikhomirov <ptikhomirov at virtuozzo.com>
Date: Tue Nov 7 12:06:20 2017 +0300
ve/cgroup: make cgroup_get_ve_root visible in kernel/sched/core.c
Need it to find out root ve cgroup for nr_cpus and cpu_rate.
Signed-off-by: Pavel Tikhomirov <ptikhomirov at virtuozzo.com>
Reviewed-by: Andrey Ryabinin <aryabinin at virtuozzo.com>
---
include/linux/ve.h | 7 +++++++
kernel/cgroup.c | 7 +------
2 files changed, 8 insertions(+), 6 deletions(-)
diff --git a/include/linux/ve.h b/include/linux/ve.h
index 7999746..486fa24 100644
--- a/include/linux/ve.h
+++ b/include/linux/ve.h
@@ -226,6 +226,8 @@ extern void vtty_release(struct tty_struct *tty, struct tty_struct *o_tty,
extern bool vtty_is_master(struct tty_struct *tty);
#endif /* CONFIG_TTY */
+extern struct cgroup *cgroup_get_ve_root(struct cgroup *cgrp);
+
#else /* CONFIG_VE */
#define ve_uevent_seqnum uevent_seqnum
@@ -259,6 +261,11 @@ static inline void monotonic_abs_to_ve(clockid_t which_clock,
struct timespec *tp) { }
static inline void monotonic_ve_to_abs(clockid_t which_clock,
struct timepsec *tp) { }
+
+static inline struct cgroup *cgroup_get_ve_root(struct cgroup *cgrp)
+{
+ return NULL;
+}
#endif /* CONFIG_VE */
struct seq_file;
diff --git a/kernel/cgroup.c b/kernel/cgroup.c
index 06863de..51ce4ab 100644
--- a/kernel/cgroup.c
+++ b/kernel/cgroup.c
@@ -4280,7 +4280,7 @@ void cgroup_mark_ve_root(struct ve_struct *ve)
mutex_unlock(&cgroup_mutex);
}
-static struct cgroup *cgroup_get_ve_root(struct cgroup *cgrp)
+struct cgroup *cgroup_get_ve_root(struct cgroup *cgrp)
{
struct cgroup *ve_root = NULL;
@@ -4294,11 +4294,6 @@ static struct cgroup *cgroup_get_ve_root(struct cgroup *cgrp)
return ve_root;
}
-#else
-static inline struct cgroup *cgroup_get_ve_root(struct cgroup *cgrp)
-{
- return NULL;
-}
#endif
/*
More information about the Devel
mailing list