[PATCH RFC 14/25] net: Move net_defaults_ops to pernet_sys list

Kirill Tkhai
2017-11-17T18:29:42Z

According to net/core/Makefile, net/core/net_namespace.o
core initcalls execute right after net/core/sock.o.

net_defaults_ops introduces only net_defaults_init_net method,
and it acts on net::core::sysctl_somaxconn, which
is not interested the rest of pernet_subsys and pernet_device
lists. Then, move it to pernet_sys.

Signed-off-by: Kirill Tkhai <ktkhai@virtuozzo.com>
---
net/core/net_namespace.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/net/core/net_namespace.c b/net/core/net_namespace.c
index 2e8295aa7003..7fc9d44c1817 100644
--- a/net/core/net_namespace.c
+++ b/net/core/net_namespace.c
@@ -371,7 +371,7 @@ static struct pernet_operations net_defaults_ops = {

static __init int net_defaults_init(void)
{
- if (register_pernet_subsys(&net_defaults_ops))
+ if (register_pernet_sys(&net_defaults_ops))
panic("Cannot initialize net default settings");

return 0;