diff options
author | Eric Dumazet <dada1@cosmosbay.com> | 2008-11-12 00:54:54 -0800 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-11-12 00:54:54 -0800 |
commit | e42ea986e4a4cab4209d982feffcaf50f21e80e3 (patch) | |
tree | da674327f247cf325320caef87df6af5a0af8fd6 /include/net | |
parent | 7a9546ee354ec6f23af403992b8c07baa50a23d2 (diff) | |
download | kernel_samsung_tuna-e42ea986e4a4cab4209d982feffcaf50f21e80e3.zip kernel_samsung_tuna-e42ea986e4a4cab4209d982feffcaf50f21e80e3.tar.gz kernel_samsung_tuna-e42ea986e4a4cab4209d982feffcaf50f21e80e3.tar.bz2 |
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')
-rw-r--r-- | include/net/neighbour.h | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/include/net/neighbour.h b/include/net/neighbour.h index 365b5e2..d8d790e 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 static inline struct net *neigh_parms_net(const struct neigh_parms *parms) { -#ifdef CONFIG_NET_NS - return parms->net; -#else - return &init_net; -#endif + return read_pnet(&parms->net); } extern 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 static inline struct net *pneigh_net(const struct pneigh_entry *pneigh) { -#ifdef CONFIG_NET_NS - return pneigh->net; -#else - return &init_net; -#endif + return read_pnet(&pneigh->net); } extern void neigh_app_ns(struct neighbour *n); |