[Devel] [PATCH RHEL10 COMMIT] fixup! ve/fs/aio: aio_nr & aio_max_nr variables virtualization

Konstantin Khorenko khorenko at virtuozzo.com
Fri Jun 5 21:32:07 MSK 2026


The commit is pushed to "branch-rh10-6.12.0-55.52.1.5.x.vz10-ovz" and will appear at git at bitbucket.org:openvz/vzkernel.git
after rh10-6.12.0-55.52.1.5.29.vz10
------>
commit 6a679ee4e8bcb141c8086c97490b265901cf6683
Author: Vladimir Riabchun <vladimir.riabchun at virtuozzo.com>
Date:   Tue Jun 2 21:10:33 2026 +0000

    fixup! ve/fs/aio: aio_nr & aio_max_nr variables virtualization
    
    ve0 doesn't exist when !CONFIG_VE.
    
    https://virtuozzo.atlassian.net/browse/VSTOR-130116
    
    Feature: !CONFIG_VE build
    Signed-off-by: Vladimir Riabchun <vladimir.riabchun at virtuozzo.com>
    Reviewed-by: Vasileios Almpanis <vasileios.almpanis at virtuozzo.com>
---
 fs/aio.c | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/fs/aio.c b/fs/aio.c
index c6c3e5808ceb7..bd6faf8b49d0c 100644
--- a/fs/aio.c
+++ b/fs/aio.c
@@ -225,14 +225,22 @@ struct aio_kiocb {
 static struct ctl_table aio_sysctls[] = {
 	{
 		.procname	= "aio-nr",
+	/*
+	 * When !CONFIG_VE this doesn't matter - we take ve->aio_nr_lock,
+	 * but ve is NULL.
+	 */
+#ifdef CONFIG_VE
 		.data		= &ve0.aio_nr,
+#endif
 		.maxlen		= sizeof(unsigned long),
 		.mode		= 0444 | S_ISVTX,
 		.proc_handler	= proc_doulongvec_minmax_virtual,
 	},
 	{
 		.procname	= "aio-max-nr",
+#ifdef CONFIG_VE
 		.data		= &ve0.aio_max_nr,
+#endif
 		.maxlen		= sizeof(unsigned long),
 		.mode		= 0644 | S_ISVTX,
 		.proc_handler	= proc_doulongvec_minmax_virtual,


More information about the Devel mailing list