aboutsummaryrefslogtreecommitdiffstats
path: root/net/core/dst.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/core/dst.c')
-rw-r--r--net/core/dst.c17
1 files changed, 5 insertions, 12 deletions
diff --git a/net/core/dst.c b/net/core/dst.c
index 6135f3671692..14b33baf0733 100644
--- a/net/core/dst.c
+++ b/net/core/dst.c
@@ -171,8 +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 dst->hh = NULL;
176#ifdef CONFIG_XFRM 175#ifdef CONFIG_XFRM
177 dst->xfrm = NULL; 176 dst->xfrm = NULL;
178#endif 177#endif
@@ -226,21 +225,15 @@ struct dst_entry *dst_destroy(struct dst_entry * dst)
226{ 225{
227 struct dst_entry *child; 226 struct dst_entry *child;
228 struct neighbour *neigh; 227 struct neighbour *neigh;
229 struct hh_cache *hh;
230 228
231 smp_rmb(); 229 smp_rmb();
232 230
233again: 231again:
234 neigh = dst->neighbour; 232 neigh = dst->_neighbour;
235 hh = dst->hh;
236 child = dst->child; 233 child = dst->child;
237 234
238 dst->hh = NULL;
239 if (hh)
240 hh_cache_put(hh);
241
242 if (neigh) { 235 if (neigh) {
243 dst->neighbour = NULL; 236 dst->_neighbour = NULL;
244 neigh_release(neigh); 237 neigh_release(neigh);
245 } 238 }
246 239
@@ -370,8 +363,8 @@ static void dst_ifdown(struct dst_entry *dst, struct net_device *dev,
370 dst->dev = dev_net(dst->dev)->loopback_dev; 363 dst->dev = dev_net(dst->dev)->loopback_dev;
371 dev_hold(dst->dev); 364 dev_hold(dst->dev);
372 dev_put(dev); 365 dev_put(dev);
373 if (dst->neighbour && dst->neighbour->dev == dev) { 366 if (dst->_neighbour && dst->_neighbour->dev == dev) {
374 dst->neighbour->dev = dst->dev; 367 dst->_neighbour->dev = dst->dev;
375 dev_hold(dst->dev); 368 dev_hold(dst->dev);
376 dev_put(dev); 369 dev_put(dev);
377 } 370 }