diff options
author | David S. Miller <davem@davemloft.net> | 2012-06-09 19:27:05 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2012-06-09 19:27:05 -0400 |
commit | c3426b47190d7c6785230c91a706fd42208b4120 (patch) | |
tree | 5444acfb2ef8a59c46e580cda8101c32fd3c2973 /include/net/inetpeer.h | |
parent | 2397849baa7c44c242e5d5142d5d16d1e7ed53d0 (diff) |
inet: Initialize per-netns inetpeer roots in net/ipv{4,6}/route.c
Instead of net/ipv4/inetpeer.c
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/net/inetpeer.h')
-rw-r--r-- | include/net/inetpeer.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/include/net/inetpeer.h b/include/net/inetpeer.h index 20e67db69ac9..5a96c8edc526 100644 --- a/include/net/inetpeer.h +++ b/include/net/inetpeer.h | |||
@@ -65,6 +65,14 @@ struct inet_peer { | |||
65 | atomic_t refcnt; | 65 | atomic_t refcnt; |
66 | }; | 66 | }; |
67 | 67 | ||
68 | struct inet_peer_base { | ||
69 | struct inet_peer __rcu *root; | ||
70 | seqlock_t lock; | ||
71 | int total; | ||
72 | }; | ||
73 | |||
74 | extern void inet_peer_base_init(struct inet_peer_base *); | ||
75 | |||
68 | void inet_initpeers(void) __init; | 76 | void inet_initpeers(void) __init; |
69 | 77 | ||
70 | #define INETPEER_METRICS_NEW (~(u32) 0) | 78 | #define INETPEER_METRICS_NEW (~(u32) 0) |
@@ -105,6 +113,7 @@ static inline struct inet_peer *inet_getpeer_v6(struct net *net, | |||
105 | extern void inet_putpeer(struct inet_peer *p); | 113 | extern void inet_putpeer(struct inet_peer *p); |
106 | extern bool inet_peer_xrlim_allow(struct inet_peer *peer, int timeout); | 114 | extern bool inet_peer_xrlim_allow(struct inet_peer *peer, int timeout); |
107 | 115 | ||
116 | extern void __inetpeer_invalidate_tree(struct inet_peer_base *); | ||
108 | extern void inetpeer_invalidate_tree(struct net *net, int family); | 117 | extern void inetpeer_invalidate_tree(struct net *net, int family); |
109 | 118 | ||
110 | /* | 119 | /* |