]> Pileus Git - ~andy/linux/blobdiff - drivers/scsi/cxgbi/cxgb4i/cxgb4i.c
Merge tag 'scsi-misc' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi
[~andy/linux] / drivers / scsi / cxgbi / cxgb4i / cxgb4i.c
index a12a1fe9cda43929644afbdcacafba7e9c19238f..f924b3c3720e3fa268db4470e0987b388e4eee7d 100644 (file)
@@ -1142,7 +1142,7 @@ static int init_act_open(struct cxgbi_sock *csk)
        cxgbi_sock_set_flag(csk, CTPF_HAS_ATID);
        cxgbi_sock_get(csk);
 
-       n = dst_get_neighbour_noref(csk->dst);
+       n = dst_neigh_lookup(csk->dst, &csk->daddr.sin_addr.s_addr);
        if (!n) {
                pr_err("%s, can't get neighbour of csk->dst.\n", ndev->name);
                goto rel_resource;
@@ -1182,9 +1182,12 @@ static int init_act_open(struct cxgbi_sock *csk)
 
        cxgbi_sock_set_state(csk, CTP_ACTIVE_OPEN);
        send_act_open_req(csk, skb, csk->l2t);
+       neigh_release(n);
        return 0;
 
 rel_resource:
+       if (n)
+               neigh_release(n);
        if (skb)
                __kfree_skb(skb);
        return -EINVAL;