[Devel] Re: [patch 03/20] [Network namespace] Remove useless code

Cedric Le Goater clg at fr.ibm.com
Mon Dec 11 07:08:05 PST 2006


dlezcano at fr.ibm.com wrote:
> Signed-off-by: Daniel Lezcano <dlezcano at fr.ibm.com>
> 
> ---
> 
>  net/core/net_namespace.c |    5 -----
>  1 files changed, 5 deletions(-)
> 
> Index: 2.6.19-rc6-mm2/net/core/net_namespace.c
> ===================================================================
> --- 2.6.19-rc6-mm2.orig/net/core/net_namespace.c
> +++ 2.6.19-rc6-mm2/net/core/net_namespace.c
> @@ -128,11 +128,6 @@ void free_net_ns(struct kref *kref)
>  	/* taking lock after atomic_dec_and_test is racy */
>  	spin_lock_irqsave(&net_ns_list_lock, flags);
>  	ns = container_of(kref, struct net_namespace, kref);
> -	if (atomic_read(&ns->kref.refcount) ||
> -	    list_empty(&ns->sibling_list)) {
> -		spin_unlock_irqrestore(&net_ns_list_lock, flags);
> -		return;
> -	}

why ? 


>  	list_del_init(&ns->sibling_list);
>  	spin_unlock_irqrestore(&net_ns_list_lock, flags);
>  	put_net_ns(ns->parent);
> 

_______________________________________________
Containers mailing list
Containers at lists.osdl.org
https://lists.osdl.org/mailman/listinfo/containers




More information about the Devel mailing list