[Devel] [PATCH RHEL8 COMMIT] ve/time: Move ve_get_uptime() to header

Konstantin Khorenko khorenko at virtuozzo.com
Tue Dec 22 13:54:55 MSK 2020


The commit is pushed to "branch-rh8-4.18.0-240.1.1.vz8.5.x-ovz" and will appear at https://src.openvz.org/scm/ovz/vzkernel.git
after rh8-4.18.0-240.1.1.vz8.5.3
------>
commit d99d1df4d0a762c8eb674cd764b08a7e0735c632
Author: Konstantin Khorenko <khorenko at virtuozzo.com>
Date:   Tue Nov 10 19:03:14 2020 +0300

    ve/time: Move ve_get_uptime() to header
    
    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>
    Reviewed-by: Valeriy Vdovin <valeriy.vdovin 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;


More information about the Devel mailing list