Skip to content

Commit

Permalink
neigh: Simply destroy handling wrt. hh_cache.
Browse files Browse the repository at this point in the history
Now that hh_cache entries are embedded inside of neighbour
entries, their lifetimes and accesses are now synchronous
to that of the encompassing neighbour object.

Therefore we don't need to hook up the blackhole op to
hh_output on destroy.

Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
David S. Miller committed Jul 17, 2011
1 parent 05e3aa0 commit 0895b08
Showing 1 changed file with 0 additions and 9 deletions.
9 changes: 0 additions & 9 deletions net/core/neighbour.c
Original file line number Diff line number Diff line change
Expand Up @@ -689,8 +689,6 @@ static void neigh_destroy_rcu(struct rcu_head *head)
*/
void neigh_destroy(struct neighbour *neigh)
{
struct hh_cache *hh;

NEIGH_CACHE_STAT_INC(neigh->tbl, destroys);

if (!neigh->dead) {
Expand All @@ -703,13 +701,6 @@ void neigh_destroy(struct neighbour *neigh)
if (neigh_del_timer(neigh))
printk(KERN_WARNING "Impossible event.\n");

hh = &neigh->hh;
if (hh->hh_len) {
write_seqlock_bh(&hh->hh_lock);
hh->hh_output = neigh_blackhole;
write_sequnlock_bh(&hh->hh_lock);
}

skb_queue_purge(&neigh->arp_queue);

dev_put(neigh->dev);
Expand Down

0 comments on commit 0895b08

Please sign in to comment.