[Devel] [PATCH v2 rh8 1/2] ve/time: Move ve_get_uptime() to header

Konstantin Khorenko khorenko at virtuozzo.com
Mon Dec 21 16:38:17 MSK 2020


Will be used in ve.h in another function.

To_merge: 9644a237d401 ("ve/vestat: Introduce /proc/vz/vestat")

Signed-off-by: Konstantin Khorenko <khorenko at virtuozzo.com>
---
 include/linux/ve.h  | 5 +++++
 kernel/ve/vecalls.c | 5 -----
 2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/include/linux/ve.h b/include/linux/ve.h
index 7cb416f342e7..3aa0ea0b1bab 100644
--- a/include/linux/ve.h
+++ b/include/linux/ve.h
@@ -143,6 +143,11 @@ static inline struct ve_struct *css_to_ve(struct cgroup_subsys_state *css)
 
 extern struct cgroup_subsys_state *ve_get_init_css(struct ve_struct *ve, int subsys_id);
 
+static u64 ve_get_uptime(struct ve_struct *ve)
+{
+	return ktime_get_boot_ns() - ve->real_start_time;
+}
+
 extern void monotonic_abs_to_ve(clockid_t which_clock, struct timespec64 *tp);
 extern void monotonic_ve_to_abs(clockid_t which_clock, struct timespec64 *tp);
 
diff --git a/kernel/ve/vecalls.c b/kernel/ve/vecalls.c
index 786a743faa1a..f1cc04ee82da 100644
--- a/kernel/ve/vecalls.c
+++ b/kernel/ve/vecalls.c
@@ -32,11 +32,6 @@
 #include <linux/veowner.h>
 #include <linux/device_cgroup.h>
 
-static u64 ve_get_uptime(struct ve_struct *ve)
-{
-	return ktime_get_boot_ns() - ve->real_start_time;
-}
-
 static int fill_cpu_stat(envid_t veid, struct vz_cpu_stat __user *buf)
 {
 	struct ve_struct *ve;
-- 
2.28.0



More information about the Devel mailing list