[Devel] [PATCH RHEL10 COMMIT] ve: Add put_ve() cleanup helper

Konstantin Khorenko khorenko at virtuozzo.com
Mon Dec 1 20:08:04 MSK 2025


The commit is pushed to "branch-rh10-6.12.0-55.13.1.2.x.vz10-ovz" and will appear at git at bitbucket.org:openvz/vzkernel.git
after rh10-6.12.0-55.13.1.2.21.vz10
------>
commit 9505e1b00c3f363f22998523353491d8acf7bc5c
Author: Pavel Tikhomirov <ptikhomirov at virtuozzo.com>
Date:   Mon Nov 24 19:20:45 2025 +0800

    ve: Add put_ve() cleanup helper
    
    This will allow us to take local reference to ve more easily wihout the
    need to put it on error paths, as cleanup attribute will automatically
    handle put when scope of variable ends.
    
    https://virtuozzo.atlassian.net/browse/VSTOR-118289
    Signed-off-by: Pavel Tikhomirov <ptikhomirov at virtuozzo.com>
    
    Feature: ve: ve generic structures
    ======
    Patchset description:
    ve: Add VE namespace
    
    Main ideas behind VE namespace explained in "ve: Introduce VE
    namespace".
---
 include/linux/ve.h | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/include/linux/ve.h b/include/linux/ve.h
index 24d06ed21e749..63b80068e2fb5 100644
--- a/include/linux/ve.h
+++ b/include/linux/ve.h
@@ -302,4 +302,6 @@ static inline int ve_get_cpu_avenrun(struct ve_struct *ve, unsigned long *avenru
 static inline int ve_get_cpu_stat(struct ve_struct *ve, struct kernel_cpustat *kstat) { return -ENOSYS; }
 #endif
 
+DEFINE_FREE(put_ve, struct ve_struct *, put_ve(_T))
+
 #endif /* _LINUX_VE_H */


More information about the Devel mailing list