IB/rdmavt: Use rvt_put_swqe() in rvt_clear_mr_ref()
authorMike Marciniszyn <mike.marciniszyn@intel.com>
Tue, 22 Aug 2017 01:26:14 +0000 (18:26 -0700)
committerDoug Ledford <dledford@redhat.com>
Mon, 28 Aug 2017 23:12:16 +0000 (19:12 -0400)
hfi1 and qib were converted in previous patches, do the same for rdmavt.

Signed-off-by: Mike Marciniszyn <mike.marciniszyn@intel.com>
Signed-off-by: Dennis Dalessandro <dennis.dalessandro@intel.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
drivers/infiniband/sw/rdmavt/qp.c

index 6f6525d24a2f13ea1395ab4e71cb5162fff8a1b7..3a238b00885e619eba5b7f1738a248b65c290902 100644 (file)
@@ -440,13 +440,9 @@ static void rvt_clear_mr_refs(struct rvt_qp *qp, int clr_sends)
        if (clr_sends) {
                while (qp->s_last != qp->s_head) {
                        struct rvt_swqe *wqe = rvt_get_swqe_ptr(qp, qp->s_last);
-                       unsigned i;
 
-                       for (i = 0; i < wqe->wr.num_sge; i++) {
-                               struct rvt_sge *sge = &wqe->sg_list[i];
+                       rvt_put_swqe(wqe);
 
-                               rvt_put_mr(sge->mr);
-                       }
                        if (qp->ibqp.qp_type == IB_QPT_UD ||
                            qp->ibqp.qp_type == IB_QPT_SMI ||
                            qp->ibqp.qp_type == IB_QPT_GSI)