diff options
-rw-r--r-- | net/sunrpc/xprtrdma/svc_rdma_sendto.c | 3 | ||||
-rw-r--r-- | net/sunrpc/xprtrdma/svc_rdma_transport.c | 3 |
2 files changed, 5 insertions, 1 deletions
diff --git a/net/sunrpc/xprtrdma/svc_rdma_sendto.c b/net/sunrpc/xprtrdma/svc_rdma_sendto.c index 6c26a675435a..8b510c5e8777 100644 --- a/net/sunrpc/xprtrdma/svc_rdma_sendto.c +++ b/net/sunrpc/xprtrdma/svc_rdma_sendto.c | |||
@@ -183,6 +183,7 @@ static int fast_reg_xdr(struct svcxprt_rdma *xprt, | |||
183 | 183 | ||
184 | fatal_err: | 184 | fatal_err: |
185 | printk("svcrdma: Error fast registering memory for xprt %p\n", xprt); | 185 | printk("svcrdma: Error fast registering memory for xprt %p\n", xprt); |
186 | vec->frmr = NULL; | ||
186 | svc_rdma_put_frmr(xprt, frmr); | 187 | svc_rdma_put_frmr(xprt, frmr); |
187 | return -EIO; | 188 | return -EIO; |
188 | } | 189 | } |
@@ -516,6 +517,7 @@ static int send_reply(struct svcxprt_rdma *rdma, | |||
516 | "svcrdma: could not post a receive buffer, err=%d." | 517 | "svcrdma: could not post a receive buffer, err=%d." |
517 | "Closing transport %p.\n", ret, rdma); | 518 | "Closing transport %p.\n", ret, rdma); |
518 | set_bit(XPT_CLOSE, &rdma->sc_xprt.xpt_flags); | 519 | set_bit(XPT_CLOSE, &rdma->sc_xprt.xpt_flags); |
520 | svc_rdma_put_frmr(rdma, vec->frmr); | ||
519 | svc_rdma_put_context(ctxt, 0); | 521 | svc_rdma_put_context(ctxt, 0); |
520 | return -ENOTCONN; | 522 | return -ENOTCONN; |
521 | } | 523 | } |
@@ -606,6 +608,7 @@ static int send_reply(struct svcxprt_rdma *rdma, | |||
606 | return 0; | 608 | return 0; |
607 | 609 | ||
608 | err: | 610 | err: |
611 | svc_rdma_unmap_dma(ctxt); | ||
609 | svc_rdma_put_frmr(rdma, vec->frmr); | 612 | svc_rdma_put_frmr(rdma, vec->frmr); |
610 | svc_rdma_put_context(ctxt, 1); | 613 | svc_rdma_put_context(ctxt, 1); |
611 | return -EIO; | 614 | return -EIO; |
diff --git a/net/sunrpc/xprtrdma/svc_rdma_transport.c b/net/sunrpc/xprtrdma/svc_rdma_transport.c index 3d810e7df3fb..4b0c2fa15e0b 100644 --- a/net/sunrpc/xprtrdma/svc_rdma_transport.c +++ b/net/sunrpc/xprtrdma/svc_rdma_transport.c | |||
@@ -520,8 +520,9 @@ int svc_rdma_post_recv(struct svcxprt_rdma *xprt) | |||
520 | svc_xprt_get(&xprt->sc_xprt); | 520 | svc_xprt_get(&xprt->sc_xprt); |
521 | ret = ib_post_recv(xprt->sc_qp, &recv_wr, &bad_recv_wr); | 521 | ret = ib_post_recv(xprt->sc_qp, &recv_wr, &bad_recv_wr); |
522 | if (ret) { | 522 | if (ret) { |
523 | svc_xprt_put(&xprt->sc_xprt); | 523 | svc_rdma_unmap_dma(ctxt); |
524 | svc_rdma_put_context(ctxt, 1); | 524 | svc_rdma_put_context(ctxt, 1); |
525 | svc_xprt_put(&xprt->sc_xprt); | ||
525 | } | 526 | } |
526 | return ret; | 527 | return ret; |
527 | 528 | ||