[Devel] [RFC 16/54] proc_sysctl: fix CONFIG_VE=n build
Eva Kurchatova
eva.kurchatova at virtuozzo.com
Wed Apr 29 22:58:16 MSK 2026
Signed-off-by: Eva Kurchatova <eva.kurchatova at virtuozzo.com>
---
fs/proc/proc_sysctl.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/fs/proc/proc_sysctl.c b/fs/proc/proc_sysctl.c
index e9fa20b84379..9df77d104793 100644
--- a/fs/proc/proc_sysctl.c
+++ b/fs/proc/proc_sysctl.c
@@ -75,6 +75,7 @@ static struct ctl_table root_table[] = {
},
};
+#ifdef CONFIG_VE
static int sysctl_root_permissions(struct ctl_table_header *head,
const struct ctl_table *table)
{
@@ -83,6 +84,7 @@ static int sysctl_root_permissions(struct ctl_table_header *head,
return table->mode & ~S_IWUGO;
}
+#endif
static struct ctl_table_root sysctl_table_root = {
.default_set.dir.header = {
@@ -93,7 +95,9 @@ static struct ctl_table_root sysctl_table_root = {
.root = &sysctl_table_root,
.set = &sysctl_table_root.default_set,
},
+#ifdef CONFIG_VE
.permissions = sysctl_root_permissions,
+#endif
};
static DEFINE_SPINLOCK(sysctl_lock);
--
2.54.0
More information about the Devel
mailing list