[Devel] [RFC 44/54] net_namespace: fix CONFIG_VE=n build

Eva Kurchatova eva.kurchatova at virtuozzo.com
Wed Apr 29 22:58:44 MSK 2026


Signed-off-by: Eva Kurchatova <eva.kurchatova at virtuozzo.com>
---
 net/core/net_namespace.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/net/core/net_namespace.c b/net/core/net_namespace.c
index 40e74d956bc2..329f65aa34a0 100644
--- a/net/core/net_namespace.c
+++ b/net/core/net_namespace.c
@@ -507,7 +507,9 @@ static void inc_netns_avail(struct ve_struct *ve)
 struct net *copy_net_ns(unsigned long flags,
 			struct user_namespace *user_ns, struct net *old_net)
 {
+#ifdef CONFIG_VE
 	struct ve_struct *ve = get_exec_env();
+#endif
 	struct ucounts *ucounts;
 	struct net *net;
 	int rv;
-- 
2.54.0



More information about the Devel mailing list