[Devel] [RFC 23/54] ve: fix CONFIG_VE=n build

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


Signed-off-by: Eva Kurchatova <eva.kurchatova at virtuozzo.com>
---
 include/linux/ve.h | 13 ++++++++-----
 1 file changed, 8 insertions(+), 5 deletions(-)

diff --git a/include/linux/ve.h b/include/linux/ve.h
index 224acf012821..103b89ac68b6 100644
--- a/include/linux/ve.h
+++ b/include/linux/ve.h
@@ -22,6 +22,7 @@
 #include <linux/time_namespace.h>
 #include <linux/binfmts.h>
 #include <linux/pid.h>
+#include <net/net_namespace.h>
 
 struct nsproxy;
 struct user_namespace;
@@ -301,12 +302,9 @@ static inline void ve_exit_ns(struct pid_namespace *ns) { }
 
 static inline void ve_set_state(struct ve_struct *ve, int new_state) {}
 
-#define ve_feature_set(ve, f)		{ true; }
+#define ve_feature_set(ve, f)	true
 
-static inline bool current_user_ns_initial(void)
-{
-	return current_user_ns() == init_cred.user_ns;
-}
+bool current_user_ns_initial(void);
 
 static inline struct user_namespace *ve_init_user_ns(void)
 {
@@ -329,6 +327,11 @@ static inline struct cgroup_subsys_state *css_ve_root1(
 	return NULL;
 }
 
+static inline pid_t task_pid_ve_nr(struct task_struct *tsk)
+{
+	return task_pid_nr(tsk);
+}
+
 #define ve_uevent_seqnum uevent_seqnum
 
 static inline int vz_security_family_check(struct net *net, int family, int type) { return 0; }
-- 
2.54.0



More information about the Devel mailing list