aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/infiniband
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/infiniband')
-rw-r--r--drivers/infiniband/ulp/ipoib/ipoib_main.c16
1 files changed, 1 insertions, 15 deletions
diff --git a/drivers/infiniband/ulp/ipoib/ipoib_main.c b/drivers/infiniband/ulp/ipoib/ipoib_main.c
index c3b5f79d1168..9d9cecd4753b 100644
--- a/drivers/infiniband/ulp/ipoib/ipoib_main.c
+++ b/drivers/infiniband/ulp/ipoib/ipoib_main.c
@@ -247,7 +247,6 @@ static void path_free(struct net_device *dev, struct ipoib_path *path)
247 if (neigh->ah) 247 if (neigh->ah)
248 ipoib_put_ah(neigh->ah); 248 ipoib_put_ah(neigh->ah);
249 *to_ipoib_neigh(neigh->neighbour) = NULL; 249 *to_ipoib_neigh(neigh->neighbour) = NULL;
250 neigh->neighbour->ops->destructor = NULL;
251 kfree(neigh); 250 kfree(neigh);
252 } 251 }
253 252
@@ -530,7 +529,6 @@ static void neigh_add_path(struct sk_buff *skb, struct net_device *dev)
530err: 529err:
531 *to_ipoib_neigh(skb->dst->neighbour) = NULL; 530 *to_ipoib_neigh(skb->dst->neighbour) = NULL;
532 list_del(&neigh->list); 531 list_del(&neigh->list);
533 neigh->neighbour->ops->destructor = NULL;
534 kfree(neigh); 532 kfree(neigh);
535 533
536 ++priv->stats.tx_dropped; 534 ++priv->stats.tx_dropped;
@@ -769,21 +767,9 @@ static void ipoib_neigh_destructor(struct neighbour *n)
769 ipoib_put_ah(ah); 767 ipoib_put_ah(ah);
770} 768}
771 769
772static int ipoib_neigh_setup(struct neighbour *neigh)
773{
774 /*
775 * Is this kosher? I can't find anybody in the kernel that
776 * sets neigh->destructor, so we should be able to set it here
777 * without trouble.
778 */
779 neigh->ops->destructor = ipoib_neigh_destructor;
780
781 return 0;
782}
783
784static int ipoib_neigh_setup_dev(struct net_device *dev, struct neigh_parms *parms) 770static int ipoib_neigh_setup_dev(struct net_device *dev, struct neigh_parms *parms)
785{ 771{
786 parms->neigh_setup = ipoib_neigh_setup; 772 parms->neigh_destructor = ipoib_neigh_destructor;
787 773
788 return 0; 774 return 0;
789} 775}