[Devel] [PATCH RHEL7 COMMIT] ve/net: Delete get_exec_env() from venet_init_net()

Konstantin Khorenko khorenko at virtuozzo.com
Wed Jun 17 01:35:39 PDT 2015


The commit is pushed to "branch-rh7-3.10.0-123.1.2-ovz" and will appear at https://src.openvz.org/scm/ovz/vzkernel.git
after rh7-3.10.0-123.1.2.vz7.5.14
------>
commit b1dcd956670b42be05fbaf5944683e2b4f11bf40
Author: Kirill Tkhai <ktkhai at odin.com>
Date:   Wed Jun 17 12:35:39 2015 +0400

    ve/net: Delete get_exec_env() from venet_init_net()
    
    It's better to avoid get_exec_env() in a place, where we easily can
    do that.
    
    get_exec_env() used to be used in the places, where caller did
    set_exec_env() before the call. Delete it to make it do not confuse
    us like it would be an unported place from 2.6.32.
    
    Signed-off-by: Kirill Tkhai <ktkhai at odin.com>
    Reviewed-by: Vladimir Davydov <vdavydov at parallels.com>
---
 drivers/net/venetdev.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/net/venetdev.c b/drivers/net/venetdev.c
index faeed33..00457d3 100644
--- a/drivers/net/venetdev.c
+++ b/drivers/net/venetdev.c
@@ -1087,10 +1087,9 @@ err:
 
 static __net_init int venet_init_net(struct net *net)
 {
-	struct ve_struct *env;
+	struct ve_struct *env = net->owner_ve;
 	int err;
 
-	env = get_exec_env();
 	if (env->ve_netns && net != env->ve_netns) {
 		/* Don't create venet-s in sub net namespaces */
 		return 0;



More information about the Devel mailing list