diff options
author | David S. Miller <davem@davemloft.net> | 2012-07-03 01:58:02 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2012-07-05 05:42:00 -0400 |
commit | 36bdbcae2fa2a6dfa99344d4190fcea0aa7b7c25 (patch) | |
tree | 79d4167b6913428522dc6e5a0bf98a9d58d36f9e /net/core/dst.c | |
parent | d1e31fb02b31ba88d5650d97c35eb58f52bfe0e1 (diff) |
net: Kill dst->_neighbour, accessors, and final uses.
No longer used.
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/core/dst.c')
-rw-r--r-- | net/core/dst.c | 18 |
1 files changed, 0 insertions, 18 deletions
diff --git a/net/core/dst.c b/net/core/dst.c index a6e19a23a745..07bacff84aa4 100644 --- a/net/core/dst.c +++ b/net/core/dst.c | |||
@@ -171,7 +171,6 @@ 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 | RCU_INIT_POINTER(dst->_neighbour, NULL); | ||
175 | #ifdef CONFIG_XFRM | 174 | #ifdef CONFIG_XFRM |
176 | dst->xfrm = NULL; | 175 | dst->xfrm = NULL; |
177 | #endif | 176 | #endif |
@@ -225,19 +224,12 @@ EXPORT_SYMBOL(__dst_free); | |||
225 | struct dst_entry *dst_destroy(struct dst_entry * dst) | 224 | 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; | ||
229 | 227 | ||
230 | smp_rmb(); | 228 | smp_rmb(); |
231 | 229 | ||
232 | again: | 230 | again: |
233 | neigh = rcu_dereference_protected(dst->_neighbour, 1); | ||
234 | child = dst->child; | 231 | child = dst->child; |
235 | 232 | ||
236 | if (neigh) { | ||
237 | RCU_INIT_POINTER(dst->_neighbour, NULL); | ||
238 | neigh_release(neigh); | ||
239 | } | ||
240 | |||
241 | if (!(dst->flags & DST_NOCOUNT)) | 233 | if (!(dst->flags & DST_NOCOUNT)) |
242 | dst_entries_add(dst->ops, -1); | 234 | dst_entries_add(dst->ops, -1); |
243 | 235 | ||
@@ -361,19 +353,9 @@ static void dst_ifdown(struct dst_entry *dst, struct net_device *dev, | |||
361 | if (!unregister) { | 353 | if (!unregister) { |
362 | dst->input = dst->output = dst_discard; | 354 | dst->input = dst->output = dst_discard; |
363 | } else { | 355 | } else { |
364 | struct neighbour *neigh; | ||
365 | |||
366 | dst->dev = dev_net(dst->dev)->loopback_dev; | 356 | dst->dev = dev_net(dst->dev)->loopback_dev; |
367 | dev_hold(dst->dev); | 357 | dev_hold(dst->dev); |
368 | dev_put(dev); | 358 | dev_put(dev); |
369 | rcu_read_lock(); | ||
370 | neigh = dst_get_neighbour_noref(dst); | ||
371 | if (neigh && neigh->dev == dev) { | ||
372 | neigh->dev = dst->dev; | ||
373 | dev_hold(dst->dev); | ||
374 | dev_put(dev); | ||
375 | } | ||
376 | rcu_read_unlock(); | ||
377 | } | 359 | } |
378 | } | 360 | } |
379 | 361 | ||