diff options
Diffstat (limited to 'net/ipv6/af_inet6.c')
-rw-r--r-- | net/ipv6/af_inet6.c | 33 |
1 files changed, 0 insertions, 33 deletions
diff --git a/net/ipv6/af_inet6.c b/net/ipv6/af_inet6.c index df31cdd33cda..825d03e87ae0 100644 --- a/net/ipv6/af_inet6.c +++ b/net/ipv6/af_inet6.c | |||
@@ -712,39 +712,6 @@ int ipv6_opt_accepted(struct sock *sk, struct sk_buff *skb) | |||
712 | 712 | ||
713 | EXPORT_SYMBOL_GPL(ipv6_opt_accepted); | 713 | EXPORT_SYMBOL_GPL(ipv6_opt_accepted); |
714 | 714 | ||
715 | int | ||
716 | snmp6_mib_init(void *ptr[2], size_t mibsize, size_t mibalign) | ||
717 | { | ||
718 | if (ptr == NULL) | ||
719 | return -EINVAL; | ||
720 | |||
721 | ptr[0] = __alloc_percpu(mibsize); | ||
722 | if (!ptr[0]) | ||
723 | goto err0; | ||
724 | |||
725 | ptr[1] = __alloc_percpu(mibsize); | ||
726 | if (!ptr[1]) | ||
727 | goto err1; | ||
728 | |||
729 | return 0; | ||
730 | |||
731 | err1: | ||
732 | free_percpu(ptr[0]); | ||
733 | ptr[0] = NULL; | ||
734 | err0: | ||
735 | return -ENOMEM; | ||
736 | } | ||
737 | |||
738 | void | ||
739 | snmp6_mib_free(void *ptr[2]) | ||
740 | { | ||
741 | if (ptr == NULL) | ||
742 | return; | ||
743 | free_percpu(ptr[0]); | ||
744 | free_percpu(ptr[1]); | ||
745 | ptr[0] = ptr[1] = NULL; | ||
746 | } | ||
747 | |||
748 | static int __init init_ipv6_mibs(void) | 715 | static int __init init_ipv6_mibs(void) |
749 | { | 716 | { |
750 | if (snmp6_mib_init((void **)ipv6_statistics, sizeof (struct ipstats_mib), | 717 | if (snmp6_mib_init((void **)ipv6_statistics, sizeof (struct ipstats_mib), |