diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2008-04-18 21:02:35 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-04-18 21:02:35 -0400 |
commit | 334d094504c2fe1c44211ecb49146ae6bca8c321 (patch) | |
tree | d3c0f68e4b9f8e3d2ccc39e7dfe5de0534a5fad9 /net/dccp/proto.c | |
parent | d1a4be630fb068f251d64b62919f143c49ca8057 (diff) | |
parent | d1643d24c61b725bef399cc1cf2944b4c9c23177 (diff) |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6.26
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6.26: (1090 commits)
[NET]: Fix and allocate less memory for ->priv'less netdevices
[IPV6]: Fix dangling references on error in fib6_add().
[NETLABEL]: Fix NULL deref in netlbl_unlabel_staticlist_gen() if ifindex not found
[PKT_SCHED]: Fix datalen check in tcf_simp_init().
[INET]: Uninline the __inet_inherit_port call.
[INET]: Drop the inet_inherit_port() call.
SCTP: Initialize partial_bytes_acked to 0, when all of the data is acked.
[netdrvr] forcedeth: internal simplifications; changelog removal
phylib: factor out get_phy_id from within get_phy_device
PHY: add BCM5464 support to broadcom PHY driver
cxgb3: Fix __must_check warning with dev_dbg.
tc35815: Statistics cleanup
natsemi: fix MMIO for PPC 44x platforms
[TIPC]: Cleanup of TIPC reference table code
[TIPC]: Optimized initialization of TIPC reference table
[TIPC]: Remove inlining of reference table locking routines
e1000: convert uint16_t style integers to u16
ixgb: convert uint16_t style integers to u16
sb1000.c: make const arrays static
sb1000.c: stop inlining largish static functions
...
Diffstat (limited to 'net/dccp/proto.c')
-rw-r--r-- | net/dccp/proto.c | 27 |
1 files changed, 4 insertions, 23 deletions
diff --git a/net/dccp/proto.c b/net/dccp/proto.c index c91d3c1fd30d..a4c1b36f4bc7 100644 --- a/net/dccp/proto.c +++ b/net/dccp/proto.c | |||
@@ -1010,33 +1010,14 @@ void dccp_shutdown(struct sock *sk, int how) | |||
1010 | 1010 | ||
1011 | EXPORT_SYMBOL_GPL(dccp_shutdown); | 1011 | EXPORT_SYMBOL_GPL(dccp_shutdown); |
1012 | 1012 | ||
1013 | static int __init dccp_mib_init(void) | 1013 | static inline int dccp_mib_init(void) |
1014 | { | 1014 | { |
1015 | int rc = -ENOMEM; | 1015 | return snmp_mib_init((void**)dccp_statistics, sizeof(struct dccp_mib)); |
1016 | |||
1017 | dccp_statistics[0] = alloc_percpu(struct dccp_mib); | ||
1018 | if (dccp_statistics[0] == NULL) | ||
1019 | goto out; | ||
1020 | |||
1021 | dccp_statistics[1] = alloc_percpu(struct dccp_mib); | ||
1022 | if (dccp_statistics[1] == NULL) | ||
1023 | goto out_free_one; | ||
1024 | |||
1025 | rc = 0; | ||
1026 | out: | ||
1027 | return rc; | ||
1028 | out_free_one: | ||
1029 | free_percpu(dccp_statistics[0]); | ||
1030 | dccp_statistics[0] = NULL; | ||
1031 | goto out; | ||
1032 | |||
1033 | } | 1016 | } |
1034 | 1017 | ||
1035 | static void dccp_mib_exit(void) | 1018 | static inline void dccp_mib_exit(void) |
1036 | { | 1019 | { |
1037 | free_percpu(dccp_statistics[0]); | 1020 | snmp_mib_free((void**)dccp_statistics); |
1038 | free_percpu(dccp_statistics[1]); | ||
1039 | dccp_statistics[0] = dccp_statistics[1] = NULL; | ||
1040 | } | 1021 | } |
1041 | 1022 | ||
1042 | static int thash_entries; | 1023 | static int thash_entries; |