aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2010-12-01 20:28:18 -0500
committerDavid S. Miller <davem@davemloft.net>2010-12-01 20:28:18 -0500
commit8790ca172a1550949804a2ad59ccea310f680c9f (patch)
treef9a0bf451adc36dab6e4cb9f5430827bbd827384
parent67d5288049f46f816181f63eaa8f1371877ad8ea (diff)
inetpeer: Kill use of inet_peer_address_t typedef.
They are verboten these days. Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r--include/net/inetpeer.h12
-rw-r--r--net/ipv4/inetpeer.c8
2 files changed, 10 insertions, 10 deletions
diff --git a/include/net/inetpeer.h b/include/net/inetpeer.h
index fb8aeb1fd23f..5161bfdf5a52 100644
--- a/include/net/inetpeer.h
+++ b/include/net/inetpeer.h
@@ -14,18 +14,18 @@
14#include <net/ipv6.h> 14#include <net/ipv6.h>
15#include <asm/atomic.h> 15#include <asm/atomic.h>
16 16
17typedef struct { 17struct inetpeer_addr {
18 union { 18 union {
19 __be32 a4; 19 __be32 a4;
20 __be32 a6[4]; 20 __be32 a6[4];
21 }; 21 };
22 __u16 family; 22 __u16 family;
23} inet_peer_address_t; 23};
24 24
25struct inet_peer { 25struct inet_peer {
26 /* group together avl_left,avl_right,v4daddr to speedup lookups */ 26 /* group together avl_left,avl_right,v4daddr to speedup lookups */
27 struct inet_peer __rcu *avl_left, *avl_right; 27 struct inet_peer __rcu *avl_left, *avl_right;
28 inet_peer_address_t daddr; 28 struct inetpeer_addr daddr;
29 __u32 avl_height; 29 __u32 avl_height;
30 struct list_head unused; 30 struct list_head unused;
31 __u32 dtime; /* the time of last use of not 31 __u32 dtime; /* the time of last use of not
@@ -51,11 +51,11 @@ struct inet_peer {
51void inet_initpeers(void) __init; 51void inet_initpeers(void) __init;
52 52
53/* can be called with or without local BH being disabled */ 53/* can be called with or without local BH being disabled */
54struct inet_peer *inet_getpeer(inet_peer_address_t *daddr, int create); 54struct inet_peer *inet_getpeer(struct inetpeer_addr *daddr, int create);
55 55
56static inline struct inet_peer *inet_getpeer_v4(__be32 v4daddr, int create) 56static inline struct inet_peer *inet_getpeer_v4(__be32 v4daddr, int create)
57{ 57{
58 inet_peer_address_t daddr; 58 struct inetpeer_addr daddr;
59 59
60 daddr.a4 = v4daddr; 60 daddr.a4 = v4daddr;
61 daddr.family = AF_INET; 61 daddr.family = AF_INET;
@@ -64,7 +64,7 @@ static inline struct inet_peer *inet_getpeer_v4(__be32 v4daddr, int create)
64 64
65static inline struct inet_peer *inet_getpeer_v6(struct in6_addr *v6daddr, int create) 65static inline struct inet_peer *inet_getpeer_v6(struct in6_addr *v6daddr, int create)
66{ 66{
67 inet_peer_address_t daddr; 67 struct inetpeer_addr daddr;
68 68
69 ipv6_addr_copy((struct in6_addr *)daddr.a6, v6daddr); 69 ipv6_addr_copy((struct in6_addr *)daddr.a6, v6daddr);
70 daddr.family = AF_INET6; 70 daddr.family = AF_INET6;
diff --git a/net/ipv4/inetpeer.c b/net/ipv4/inetpeer.c
index f95b89f3916d..d9bc85751c74 100644
--- a/net/ipv4/inetpeer.c
+++ b/net/ipv4/inetpeer.c
@@ -161,8 +161,8 @@ static void unlink_from_unused(struct inet_peer *p)
161 } 161 }
162} 162}
163 163
164static int addr_compare(const inet_peer_address_t *a, 164static int addr_compare(const struct inetpeer_addr *a,
165 const inet_peer_address_t *b) 165 const struct inetpeer_addr *b)
166{ 166{
167 int i, n = (a->family == AF_INET ? 1 : 4); 167 int i, n = (a->family == AF_INET ? 1 : 4);
168 168
@@ -211,7 +211,7 @@ static int addr_compare(const inet_peer_address_t *a,
211 * But every pointer we follow is guaranteed to be valid thanks to RCU. 211 * But every pointer we follow is guaranteed to be valid thanks to RCU.
212 * We exit from this function if number of links exceeds PEER_MAXDEPTH 212 * We exit from this function if number of links exceeds PEER_MAXDEPTH
213 */ 213 */
214static struct inet_peer *lookup_rcu_bh(const inet_peer_address_t *daddr, 214static struct inet_peer *lookup_rcu_bh(const struct inetpeer_addr *daddr,
215 struct inet_peer_base *base) 215 struct inet_peer_base *base)
216{ 216{
217 struct inet_peer *u = rcu_dereference_bh(base->root); 217 struct inet_peer *u = rcu_dereference_bh(base->root);
@@ -472,7 +472,7 @@ static int cleanup_once(unsigned long ttl)
472} 472}
473 473
474/* Called with or without local BH being disabled. */ 474/* Called with or without local BH being disabled. */
475struct inet_peer *inet_getpeer(inet_peer_address_t *daddr, int create) 475struct inet_peer *inet_getpeer(struct inetpeer_addr *daddr, int create)
476{ 476{
477 struct inet_peer __rcu **stack[PEER_MAXDEPTH], ***stackptr; 477 struct inet_peer __rcu **stack[PEER_MAXDEPTH], ***stackptr;
478 struct inet_peer_base *base = family_to_base(AF_INET); 478 struct inet_peer_base *base = family_to_base(AF_INET);