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 0ebacd558ff6..37da8d3dc388 100644
--- a/drivers/infiniband/ulp/ipoib/ipoib_main.c
+++ b/drivers/infiniband/ulp/ipoib/ipoib_main.c
@@ -253,7 +253,6 @@ static void path_free(struct net_device *dev, struct ipoib_path *path)
253 if (neigh->ah) 253 if (neigh->ah)
254 ipoib_put_ah(neigh->ah); 254 ipoib_put_ah(neigh->ah);
255 *to_ipoib_neigh(neigh->neighbour) = NULL; 255 *to_ipoib_neigh(neigh->neighbour) = NULL;
256 neigh->neighbour->ops->destructor = NULL;
257 kfree(neigh); 256 kfree(neigh);
258 } 257 }
259 258
@@ -531,7 +530,6 @@ static void neigh_add_path(struct sk_buff *skb, struct net_device *dev)
531err: 530err:
532 *to_ipoib_neigh(skb->dst->neighbour) = NULL; 531 *to_ipoib_neigh(skb->dst->neighbour) = NULL;
533 list_del(&neigh->list); 532 list_del(&neigh->list);
534 neigh->neighbour->ops->destructor = NULL;
535 kfree(neigh); 533 kfree(neigh);
536 534
537 ++priv->stats.tx_dropped; 535 ++priv->stats.tx_dropped;
@@ -770,21 +768,9 @@ static void ipoib_neigh_destructor(struct neighbour *n)
770 ipoib_put_ah(ah); 768 ipoib_put_ah(ah);
771} 769}
772 770
773static int ipoib_neigh_setup(struct neighbour *neigh)
774{
775 /*
776 * Is this kosher? I can't find anybody in the kernel that
777 * sets neigh->destructor, so we should be able to set it here
778 * without trouble.
779 */
780 neigh->ops->destructor = ipoib_neigh_destructor;
781
782 return 0;
783}
784
785static int ipoib_neigh_setup_dev(struct net_device *dev, struct neigh_parms *parms) 771static int ipoib_neigh_setup_dev(struct net_device *dev, struct neigh_parms *parms)
786{ 772{
787 parms->neigh_setup = ipoib_neigh_setup; 773 parms->neigh_destructor = ipoib_neigh_destructor;
788 774
789 return 0; 775 return 0;
790} 776}