]> git.baikalelectronics.ru Git - kernel.git/commit
[NETNS]: Make the init/exit hooks checks outside the loop
authorPavel Emelyanov <xemul@openvz.org>
Thu, 1 Nov 2007 07:42:43 +0000 (00:42 -0700)
committerDavid S. Miller <davem@davemloft.net>
Thu, 1 Nov 2007 07:42:43 +0000 (00:42 -0700)
commitaf4cbf4908804cd26b7a548f1d761a4f122e6aaf
tree3f5463199c8957d3a94710d01380fc2f94d551a1
parent09974a1cf505fa3924ad5ab9c560852a3d394462
[NETNS]: Make the init/exit hooks checks outside the loop

When the new pernet something (subsys, device or operations) is
being registered, the init callback is to be called for each
namespace, that currently exitst in the system. During the
unregister, the same is to be done with the exit callback.

However, not every pernet something has both calls, but the
check for the appropriate pointer to be not NULL is performed
inside the for_each_net() loop.

This is (at least) strange, so tune this.

Signed-off-by: Pavel Emelyanov <xemul@openvz.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/core/net_namespace.c