OpenVZ Forum


Home » Mailing lists » Devel » [PATCH][NETNS] Use list_for_each_entry_continue_reverse in setup_net
Re: [PATCH][NETNS] Use list_for_each_entry_continue_reverse in setup_net [message #20299 is a reply to message #20296] Fri, 14 September 2007 21:53 Go to previous messageGo to previous message
ebiederm is currently offline  ebiederm
Messages: 1354
Registered: February 2006
Senior Member
Stephen Hemminger <shemminger@linux-foundation.org> writes:

> Could we just make it so dev->init is not allowed to fail? Then it
> can be a void function and the nasty unwind code can go?

Unfortunately we need to allocate memory, and perform other operations
that can fail.  That's the nature of the problem.

So I think not allowing init to fail would be optimizing for the wrong
the case.  Allowing init to fail makes the rest of the code simpler
because we don't have to perform the impossible when the highly
unlikely happens.

The ugly unwind is only about 5 lines of code that never need to
change (except for beautification).  So I don't think the cost
is prohibitive.

Eric
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Network Namespace status
Next Topic: [NETNS45][PATCH 1/1] Fix network namespace unshare support.
Goto Forum:
  


Current Time: Fri Aug 22 13:40:51 GMT 2025

Total time taken to generate the page: 0.15611 seconds