aboutsummaryrefslogtreecommitdiffstats
path: root/include/net/neighbour.h
diff options
context:
space:
mode:
authorEric Dumazet <dada1@cosmosbay.com>2008-11-12 03:54:54 -0500
committerDavid S. Miller <davem@davemloft.net>2008-11-12 03:54:54 -0500
commite42ea986e4a4cab4209d982feffcaf50f21e80e3 (patch)
treeda674327f247cf325320caef87df6af5a0af8fd6 /include/net/neighbour.h
parent7a9546ee354ec6f23af403992b8c07baa50a23d2 (diff)
net: Cleanup of neighbour code
Using read_pnet() and write_pnet() in neighbour code ease the reading of code. Signed-off-by: Eric Dumazet <dada1@cosmosbay.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/net/neighbour.h')
-rw-r--r--include/net/neighbour.h12
1 files changed, 2 insertions, 10 deletions
diff --git a/include/net/neighbour.h b/include/net/neighbour.h
index 365b5e260239..d8d790e56d3d 100644
--- a/include/net/neighbour.h
+++ b/include/net/neighbour.h
@@ -220,11 +220,7 @@ extern void neigh_parms_release(struct neigh_table *tbl, struct neigh_parms *p
220static inline 220static inline
221struct net *neigh_parms_net(const struct neigh_parms *parms) 221struct net *neigh_parms_net(const struct neigh_parms *parms)
222{ 222{
223#ifdef CONFIG_NET_NS 223 return read_pnet(&parms->net);
224 return parms->net;
225#else
226 return &init_net;
227#endif
228} 224}
229 225
230extern unsigned long neigh_rand_reach_time(unsigned long base); 226extern unsigned long neigh_rand_reach_time(unsigned long base);
@@ -241,11 +237,7 @@ extern int pneigh_delete(struct neigh_table *tbl, struct net *net, const void
241static inline 237static inline
242struct net *pneigh_net(const struct pneigh_entry *pneigh) 238struct net *pneigh_net(const struct pneigh_entry *pneigh)
243{ 239{
244#ifdef CONFIG_NET_NS 240 return read_pnet(&pneigh->net);
245 return pneigh->net;
246#else
247 return &init_net;
248#endif
249} 241}
250 242
251extern void neigh_app_ns(struct neighbour *n); 243extern void neigh_app_ns(struct neighbour *n);