From e7f453a04ca67a2ec4b8fac248318a03c8c9a0c2 Mon Sep 17 00:00:00 2001 From: "David S. Miller" Date: Sat, 16 Jun 2012 01:23:04 -0700 Subject: [PATCH] --- yaml --- r: 314278 b: refs/heads/master c: aee289baaa02dd2ffa1189c1600d5572a10e0714 h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/include/net/ip6_fib.h | 2 -- trunk/net/ipv6/ip6_fib.c | 18 +++++++----------- trunk/net/ipv6/route.c | 16 +++++----------- 4 files changed, 13 insertions(+), 25 deletions(-) diff --git a/[refs] b/[refs] index 70dad671ee01..8a60f675e6ea 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 42ae66c80d94645e8f74080c7f344596d6f19cd5 +refs/heads/master: aee289baaa02dd2ffa1189c1600d5572a10e0714 diff --git a/trunk/include/net/ip6_fib.h b/trunk/include/net/ip6_fib.h index 7fdbad522543..a192f7807659 100644 --- a/trunk/include/net/ip6_fib.h +++ b/trunk/include/net/ip6_fib.h @@ -302,8 +302,6 @@ extern void fib6_run_gc(unsigned long expires, extern void fib6_gc_cleanup(void); extern int fib6_init(void); -extern int fib6_init_late(void); -extern void fib6_cleanup_late(void); #ifdef CONFIG_IPV6_MULTIPLE_TABLES extern int fib6_rules_init(void); diff --git a/trunk/net/ipv6/ip6_fib.c b/trunk/net/ipv6/ip6_fib.c index a83bf067bdc5..215afc74d8aa 100644 --- a/trunk/net/ipv6/ip6_fib.c +++ b/trunk/net/ipv6/ip6_fib.c @@ -1697,25 +1697,21 @@ int __init fib6_init(void) ret = register_pernet_subsys(&fib6_net_ops); if (ret) goto out_kmem_cache_create; + + ret = __rtnl_register(PF_INET6, RTM_GETROUTE, NULL, inet6_dump_fib, + NULL); + if (ret) + goto out_unregister_subsys; out: return ret; +out_unregister_subsys: + unregister_pernet_subsys(&fib6_net_ops); out_kmem_cache_create: kmem_cache_destroy(fib6_node_kmem); goto out; } -int __init fib6_init_late(void) -{ - return __rtnl_register(PF_INET6, RTM_GETROUTE, NULL, inet6_dump_fib, - NULL); -} - -void fib6_cleanup_late(void) -{ - rtnl_unregister(PF_INET6, RTM_GETROUTE); -} - void fib6_gc_cleanup(void) { unregister_pernet_subsys(&fib6_net_ops); diff --git a/trunk/net/ipv6/route.c b/trunk/net/ipv6/route.c index 1c279fe2c9b4..e649cd78c15f 100644 --- a/trunk/net/ipv6/route.c +++ b/trunk/net/ipv6/route.c @@ -2974,13 +2974,9 @@ int __init ip6_route_init(void) if (ret) goto out_kmem_cache; - ret = fib6_init(); - if (ret) - goto out_dst_entries; - ret = register_pernet_subsys(&ipv6_inetpeer_ops); if (ret) - goto out_fib6_init; + goto out_dst_entries; ret = register_pernet_subsys(&ip6_route_net_ops); if (ret) @@ -2999,13 +2995,13 @@ int __init ip6_route_init(void) init_net.ipv6.ip6_blk_hole_entry->dst.dev = init_net.loopback_dev; init_net.ipv6.ip6_blk_hole_entry->rt6i_idev = in6_dev_get(init_net.loopback_dev); #endif - ret = fib6_init_late(); + ret = fib6_init(); if (ret) goto out_register_subsys; ret = xfrm6_init(); if (ret) - goto out_fib6_init_late; + goto out_fib6_init; ret = fib6_rules_init(); if (ret) @@ -3028,14 +3024,12 @@ int __init ip6_route_init(void) fib6_rules_cleanup(); xfrm6_init: xfrm6_fini(); -out_fib6_init_late: - fib6_cleanup_late(); +out_fib6_init: + fib6_gc_cleanup(); out_register_subsys: unregister_pernet_subsys(&ip6_route_net_ops); out_register_inetpeer: unregister_pernet_subsys(&ipv6_inetpeer_ops); -out_fib6_init: - fib6_gc_cleanup(); out_dst_entries: dst_entries_destroy(&ip6_dst_blackhole_ops); out_kmem_cache: