|
@@ -882,7 +882,7 @@ struct ib_qp *ib_create_qp(struct ib_pd *pd,
|
|
|
if (qp_init_attr->cap.max_rdma_ctxs)
|
|
|
rdma_rw_init_qp(device, qp_init_attr);
|
|
|
|
|
|
- qp = device->create_qp(pd, qp_init_attr, NULL);
|
|
|
+ qp = _ib_create_qp(device, pd, qp_init_attr, NULL);
|
|
|
if (IS_ERR(qp))
|
|
|
return qp;
|
|
|
|
|
@@ -892,7 +892,6 @@ struct ib_qp *ib_create_qp(struct ib_pd *pd,
|
|
|
return ERR_PTR(ret);
|
|
|
}
|
|
|
|
|
|
- qp->device = device;
|
|
|
qp->real_qp = qp;
|
|
|
qp->uobject = NULL;
|
|
|
qp->qp_type = qp_init_attr->qp_type;
|
|
@@ -922,7 +921,6 @@ struct ib_qp *ib_create_qp(struct ib_pd *pd,
|
|
|
atomic_inc(&qp_init_attr->srq->usecnt);
|
|
|
}
|
|
|
|
|
|
- qp->pd = pd;
|
|
|
qp->send_cq = qp_init_attr->send_cq;
|
|
|
qp->xrcd = NULL;
|
|
|
|
|
@@ -1538,6 +1536,7 @@ int ib_destroy_qp(struct ib_qp *qp)
|
|
|
if (!qp->uobject)
|
|
|
rdma_rw_cleanup_mrs(qp);
|
|
|
|
|
|
+ rdma_restrack_del(&qp->res);
|
|
|
ret = qp->device->destroy_qp(qp);
|
|
|
if (!ret) {
|
|
|
if (pd)
|