aboutsummaryrefslogtreecommitdiffstats
path: root/net/core/dst.c
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2011-07-18 02:09:49 -0400
committerDavid S. Miller <davem@davemloft.net>2011-07-18 02:11:35 -0400
commit69cce1d1404968f78b177a0314f5822d5afdbbfb (patch)
tree26223264fd69ea8078d0013fd5a76eb7aeb04c12 /net/core/dst.c
parent9cbb7ecbcff85077bb12301aaf4c9b5a56c5993d (diff)
net: Abstract dst->neighbour accesses behind helpers.
dst_{get,set}_neighbour() Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/core/dst.c')
-rw-r--r--net/core/dst.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/net/core/dst.c b/net/core/dst.c
index 4aacc14936a0..14b33baf0733 100644
--- a/net/core/dst.c
+++ b/net/core/dst.c
@@ -171,7 +171,7 @@ void *dst_alloc(struct dst_ops *ops, struct net_device *dev,
171 dst_init_metrics(dst, dst_default_metrics, true); 171 dst_init_metrics(dst, dst_default_metrics, true);
172 dst->expires = 0UL; 172 dst->expires = 0UL;
173 dst->path = dst; 173 dst->path = dst;
174 dst->neighbour = NULL; 174 dst->_neighbour = NULL;
175#ifdef CONFIG_XFRM 175#ifdef CONFIG_XFRM
176 dst->xfrm = NULL; 176 dst->xfrm = NULL;
177#endif 177#endif
@@ -229,11 +229,11 @@ struct dst_entry *dst_destroy(struct dst_entry * dst)
229 smp_rmb(); 229 smp_rmb();
230 230
231again: 231again:
232 neigh = dst->neighbour; 232 neigh = dst->_neighbour;
233 child = dst->child; 233 child = dst->child;
234 234
235 if (neigh) { 235 if (neigh) {
236 dst->neighbour = NULL; 236 dst->_neighbour = NULL;
237 neigh_release(neigh); 237 neigh_release(neigh);
238 } 238 }
239 239
@@ -363,8 +363,8 @@ static void dst_ifdown(struct dst_entry *dst, struct net_device *dev,
363 dst->dev = dev_net(dst->dev)->loopback_dev; 363 dst->dev = dev_net(dst->dev)->loopback_dev;
364 dev_hold(dst->dev); 364 dev_hold(dst->dev);
365 dev_put(dev); 365 dev_put(dev);
366 if (dst->neighbour && dst->neighbour->dev == dev) { 366 if (dst->_neighbour && dst->_neighbour->dev == dev) {
367 dst->neighbour->dev = dst->dev; 367 dst->_neighbour->dev = dst->dev;
368 dev_hold(dst->dev); 368 dev_hold(dst->dev);
369 dev_put(dev); 369 dev_put(dev);
370 } 370 }