Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 22251
b: refs/heads/master
c: c5ecd62
h: refs/heads/master
i:
  22249: 54f45fa
  22247: 8e9c0ee
v: v3
  • Loading branch information
Michael S. Tsirkin authored and David S. Miller committed Mar 21, 2006
1 parent 48045ac commit a8df2b6
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 19 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 53dcb0e38c1786aa82ada4641b4607be315b610a
refs/heads/master: c5ecd62c25400a3c6856e009f84257d5bd03f03b
16 changes: 1 addition & 15 deletions trunk/drivers/infiniband/ulp/ipoib/ipoib_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,6 @@ static void path_free(struct net_device *dev, struct ipoib_path *path)
if (neigh->ah)
ipoib_put_ah(neigh->ah);
*to_ipoib_neigh(neigh->neighbour) = NULL;
neigh->neighbour->ops->destructor = NULL;
kfree(neigh);
}

Expand Down Expand Up @@ -530,7 +529,6 @@ static void neigh_add_path(struct sk_buff *skb, struct net_device *dev)
err:
*to_ipoib_neigh(skb->dst->neighbour) = NULL;
list_del(&neigh->list);
neigh->neighbour->ops->destructor = NULL;
kfree(neigh);

++priv->stats.tx_dropped;
Expand Down Expand Up @@ -769,21 +767,9 @@ static void ipoib_neigh_destructor(struct neighbour *n)
ipoib_put_ah(ah);
}

static int ipoib_neigh_setup(struct neighbour *neigh)
{
/*
* Is this kosher? I can't find anybody in the kernel that
* sets neigh->destructor, so we should be able to set it here
* without trouble.
*/
neigh->ops->destructor = ipoib_neigh_destructor;

return 0;
}

static int ipoib_neigh_setup_dev(struct net_device *dev, struct neigh_parms *parms)
{
parms->neigh_setup = ipoib_neigh_setup;
parms->neigh_destructor = ipoib_neigh_destructor;

return 0;
}
Expand Down
2 changes: 1 addition & 1 deletion trunk/include/net/neighbour.h
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ struct neigh_parms
struct net_device *dev;
struct neigh_parms *next;
int (*neigh_setup)(struct neighbour *);
void (*neigh_destructor)(struct neighbour *);
struct neigh_table *tbl;

void *sysctl_table;
Expand Down Expand Up @@ -145,7 +146,6 @@ struct neighbour
struct neigh_ops
{
int family;
void (*destructor)(struct neighbour *);
void (*solicit)(struct neighbour *, struct sk_buff*);
void (*error_report)(struct neighbour *, struct sk_buff*);
int (*output)(struct sk_buff*);
Expand Down
4 changes: 2 additions & 2 deletions trunk/net/core/neighbour.c
Original file line number Diff line number Diff line change
Expand Up @@ -586,8 +586,8 @@ void neigh_destroy(struct neighbour *neigh)
kfree(hh);
}

if (neigh->ops && neigh->ops->destructor)
(neigh->ops->destructor)(neigh);
if (neigh->parms->neigh_destructor)
(neigh->parms->neigh_destructor)(neigh);

skb_queue_purge(&neigh->arp_queue);

Expand Down

0 comments on commit a8df2b6

Please sign in to comment.