[Devel] [PATCH VZ10 v4 15/44] fixup! ve/fs/aio: aio_nr & aio_max_nr variables virtualization

Vladimir Riabchun vladimir.riabchun at virtuozzo.com
Wed Jun 3 00:10:33 MSK 2026


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>
---
 fs/aio.c | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/fs/aio.c b/fs/aio.c
index c6c3e5808ceb..bd6faf8b49d0 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,
-- 
2.47.1



More information about the Devel mailing list