aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/infiniband/hw
diff options
context:
space:
mode:
authorDavid Miller <davem@davemloft.net>2012-01-24 08:15:57 -0500
committerDavid S. Miller <davem@davemloft.net>2012-01-25 21:30:37 -0500
commit64b7007eb99b78cbdd6cca7a98e12794201b9725 (patch)
treebcd1d92c5c44fb8d160ea0cf8d6d8ab38bbb75d4 /drivers/infiniband/hw
parent02b619555ad68884bacfbe41893245394cb44885 (diff)
infiniband: cxgb4: Convert import_ep() over to dst_neigh_lookup().
Now we must provide the IP destination address, and a reference has to be dropped when we're done with the entry. Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Steve Wise <swise@opengridcomputing.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/infiniband/hw')
-rw-r--r--drivers/infiniband/hw/cxgb4/cm.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/drivers/infiniband/hw/cxgb4/cm.c b/drivers/infiniband/hw/cxgb4/cm.c
index 0668bb3472d0..0cf61554f176 100644
--- a/drivers/infiniband/hw/cxgb4/cm.c
+++ b/drivers/infiniband/hw/cxgb4/cm.c
@@ -1562,11 +1562,11 @@ static int import_ep(struct c4iw_ep *ep, __be32 peer_ip, struct dst_entry *dst,
1562 struct neighbour *n; 1562 struct neighbour *n;
1563 int err, step; 1563 int err, step;
1564 1564
1565 rcu_read_lock(); 1565 n = dst_neigh_lookup(dst, &peer_ip);
1566 n = dst_get_neighbour_noref(dst);
1567 err = -ENODEV;
1568 if (!n) 1566 if (!n)
1569 goto out; 1567 return -ENODEV;
1568
1569 rcu_read_lock();
1570 err = -ENOMEM; 1570 err = -ENOMEM;
1571 if (n->dev->flags & IFF_LOOPBACK) { 1571 if (n->dev->flags & IFF_LOOPBACK) {
1572 struct net_device *pdev; 1572 struct net_device *pdev;
@@ -1614,6 +1614,8 @@ static int import_ep(struct c4iw_ep *ep, __be32 peer_ip, struct dst_entry *dst,
1614out: 1614out:
1615 rcu_read_unlock(); 1615 rcu_read_unlock();
1616 1616
1617 neigh_release(n);
1618
1617 return err; 1619 return err;
1618} 1620}
1619 1621