OpenVZ Forum


Home » Mailing lists » Devel » [PATCH 0/8 net-2.6.26] [NETNS]: namespace refcounting cleanup
Re: [PATCH 1/8 net-2.6.26] [NETNS]: Make netns refconting debug like a socket one. [message #29540 is a reply to message #29512] Wed, 16 April 2008 08:58 Go to previous messageGo to previous message
davem is currently offline  davem
Messages: 463
Registered: February 2006
Senior Member
From: Brian Haley <brian.haley@hp.com>
Date: Tue, 15 Apr 2008 10:55:20 -0400

> Denis V. Lunev wrote:
> > +#ifdef NETNS_REFCNT_DEBUG
> >  static inline struct net *hold_net(struct net *net)
> >  {
> > +	if (net == NULL)
> > +		return NULL;
> > +	atomic_inc(&net->use_count);
> >  	return net;
> >  }
> 
> This could be shrunk to:
 ...
> This one too:

I've checked in Denis's patch with those simplifications added.
Thanks everyone.
_______________________________________________
Containers mailing list
Containers@lists.linux-foundation.org
https://lists.linux-foundation.org/mailman/listinfo/containers
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: [PATCH 0/14 (3 subsets)] Make tuns and vlans devices work per-net.
Next Topic: Re: [PATCH 1/2] eCryptfs: Introduce device handle for userspace daemon communications
Goto Forum:
  


Current Time: Tue Nov 19 03:15:00 GMT 2024

Total time taken to generate the page: 0.03144 seconds