[NETNS]: Cleanup list walking in setup_net and cleanup_net
authorPavel Emelyanov <xemul@openvz.org>
Tue, 18 Sep 2007 20:20:41 +0000 (13:20 -0700)
committerDavid S. Miller <davem@sunset.davemloft.net>
Wed, 10 Oct 2007 23:51:35 +0000 (16:51 -0700)
commit768f3591e2b1cc309fd6f10d6579b216026d7817
tree0328abd6a6a306e648120ac2ef20332954e852e0
parent1a348ccc1047a00507e554826775a3d81f7f3437
[NETNS]: Cleanup list walking in setup_net and cleanup_net

I proposed introducing a list_for_each_entry_continue_reverse macro
to be used in setup_net() when unrolling the failed ->init callback.

Here is the macro and some more cleanup in the setup_net() itself
to remove one variable from the stack :) The same thing is for the
cleanup_net() - the existing list_for_each_entry_reverse() is used.

Minor, but the code looks nicer.

Signed-off-by: Pavel Emelyanov <xemul@openvz.org>
Acked-by: "Eric W. Biederman" <ebiederm@xmission.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/linux/list.h
net/core/net_namespace.c