diff options
author | Alexey Dobriyan <adobriyan@gmail.com> | 2010-01-16 22:35:32 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-01-17 22:16:02 -0500 |
commit | 2c8c1e7297e19bdef3c178c3ea41d898a7716e3e (patch) | |
tree | 4d336562e8d5379732a0646e17b0bb1750111ef6 /net/ipv6/mcast.c | |
parent | 72659ecce68588b74f6c46862c2b4cec137d7a5a (diff) |
net: spread __net_init, __net_exit
__net_init/__net_exit are apparently not going away, so use them
to full extent.
In some cases __net_init was removed, because it was called from
__net_exit code.
Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv6/mcast.c')
-rw-r--r-- | net/ipv6/mcast.c | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/net/ipv6/mcast.c b/net/ipv6/mcast.c index 1f9c44442e65..25f6cca79e6b 100644 --- a/net/ipv6/mcast.c +++ b/net/ipv6/mcast.c | |||
@@ -2646,7 +2646,7 @@ static const struct file_operations igmp6_mcf_seq_fops = { | |||
2646 | .release = seq_release_net, | 2646 | .release = seq_release_net, |
2647 | }; | 2647 | }; |
2648 | 2648 | ||
2649 | static int igmp6_proc_init(struct net *net) | 2649 | static int __net_init igmp6_proc_init(struct net *net) |
2650 | { | 2650 | { |
2651 | int err; | 2651 | int err; |
2652 | 2652 | ||
@@ -2666,23 +2666,22 @@ out_proc_net_igmp6: | |||
2666 | goto out; | 2666 | goto out; |
2667 | } | 2667 | } |
2668 | 2668 | ||
2669 | static void igmp6_proc_exit(struct net *net) | 2669 | static void __net_exit igmp6_proc_exit(struct net *net) |
2670 | { | 2670 | { |
2671 | proc_net_remove(net, "mcfilter6"); | 2671 | proc_net_remove(net, "mcfilter6"); |
2672 | proc_net_remove(net, "igmp6"); | 2672 | proc_net_remove(net, "igmp6"); |
2673 | } | 2673 | } |
2674 | #else | 2674 | #else |
2675 | static int igmp6_proc_init(struct net *net) | 2675 | static inline int igmp6_proc_init(struct net *net) |
2676 | { | 2676 | { |
2677 | return 0; | 2677 | return 0; |
2678 | } | 2678 | } |
2679 | static void igmp6_proc_exit(struct net *net) | 2679 | static inline void igmp6_proc_exit(struct net *net) |
2680 | { | 2680 | { |
2681 | ; | ||
2682 | } | 2681 | } |
2683 | #endif | 2682 | #endif |
2684 | 2683 | ||
2685 | static int igmp6_net_init(struct net *net) | 2684 | static int __net_init igmp6_net_init(struct net *net) |
2686 | { | 2685 | { |
2687 | int err; | 2686 | int err; |
2688 | 2687 | ||
@@ -2708,7 +2707,7 @@ out_sock_create: | |||
2708 | goto out; | 2707 | goto out; |
2709 | } | 2708 | } |
2710 | 2709 | ||
2711 | static void igmp6_net_exit(struct net *net) | 2710 | static void __net_exit igmp6_net_exit(struct net *net) |
2712 | { | 2711 | { |
2713 | inet_ctl_sock_destroy(net->ipv6.igmp_sk); | 2712 | inet_ctl_sock_destroy(net->ipv6.igmp_sk); |
2714 | igmp6_proc_exit(net); | 2713 | igmp6_proc_exit(net); |