<!DOCTYPE html><html><head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  </head>
  <body>
    <p><br>
    </p>
    <div class="moz-cite-prefix">On 5/7/26 9:10 PM, Vladimir Riabchun
      wrote:<br>
    </div>
    <blockquote type="cite" cite="mid:87716c831a612051c963578faec677cf9065ea06.1778180945.git.vladimir.riabchun@virtuozzo.com">
      <pre wrap="" class="moz-quote-pre">There is a big number of net-&gt;owner_ve, that are not covered by
ifdef guard, so it is actually easier to have this field
when !CONFIG_VE and store NULL there.

Also, fix unused variable in copy_net_ns while there.

<a class="moz-txt-link-freetext" href="https://virtuozzo.atlassian.net/browse/VSTOR-130116">https://virtuozzo.atlassian.net/browse/VSTOR-130116</a>

Feature: !CONFIG_VE build
Signed-off-by: Vladimir Riabchun <a class="moz-txt-link-rfc2396E" href="mailto:vladimir.riabchun@virtuozzo.com">&lt;vladimir.riabchun@virtuozzo.com&gt;</a>
---
 include/net/net_namespace.h | 2 --
 net/core/net_namespace.c    | 4 ++--
 2 files changed, 2 insertions(+), 4 deletions(-)

diff --git a/include/net/net_namespace.h b/include/net/net_namespace.h
index ed077747f710..11cad056f176 100644
--- a/include/net/net_namespace.h
+++ b/include/net/net_namespace.h
@@ -120,9 +120,7 @@ struct net {
 
         struct net_device       *loopback_dev;          /* The loopback */
 
-#ifdef CONFIG_VE
         struct ve_struct        *owner_ve;
-#endif
 
         /* core fib_rules */
         struct list_head        rules_ops;
diff --git a/net/core/net_namespace.c b/net/core/net_namespace.c
index 40e74d956bc2..bab48f8759f7 100644
--- a/net/core/net_namespace.c
+++ b/net/core/net_namespace.c
@@ -352,9 +352,7 @@ static __net_init int setup_net(struct net *net)
         LIST_HEAD(dev_kill_list);
         int error = 0;
 </pre>
    </blockquote>
    <font face="monospace">You need to rebase your changes for this
      patch because&nbsp;</font><span style="color: rgb(41, 42, 46); font-family: &quot;Atlassian Mono&quot;, ui-monospace, Menlo, &quot;Segoe UI Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-size: 12.25px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; white-space: pre-wrap; background-color: rgba(5, 21, 36, 0.06); text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial; display: inline !important; float: none;">[PATCH VZ10 0/8] ve: fix owner_ve of net/mnt namespaces created together with CLONE_NEWVE</span><font face="monospace">&nbsp;has moved these assignments. Now it doesn't
      apply.</font>
    <blockquote type="cite" cite="mid:87716c831a612051c963578faec677cf9065ea06.1778180945.git.vladimir.riabchun@virtuozzo.com">
      <pre wrap="" class="moz-quote-pre">
-#ifdef CONFIG_VE
         net-&gt;owner_ve = get_ve(get_exec_env());
-#endif
 
         preempt_disable();
         net-&gt;net_cookie = gen_cookie_next(&amp;net_cookie);
@@ -507,7 +505,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;
</pre>
    </blockquote>
    <pre class="moz-signature" cols="72">-- 
Best regards, Vasileios Almpanis
Software Developer, Virtuozzo.</pre>
  </body>
</html>