]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - net/sunrpc/xprtrdma/svc_rdma_sendto.c
svcrdma: Free context on post_recv error in send_reply
[linux-2.6-omap-h63xx.git] / net / sunrpc / xprtrdma / svc_rdma_sendto.c
index f61d7bd105fb9a71dbba8b662d2dfa5bd8b6ec9c..fb82b1b683f898ef3e305fd232202e693e396651 100644 (file)
@@ -396,7 +396,8 @@ static int send_reply(struct svcxprt_rdma *rdma,
                       "svcrdma: could not post a receive buffer, err=%d."
                       "Closing transport %p.\n", ret, rdma);
                set_bit(XPT_CLOSE, &rdma->sc_xprt.xpt_flags);
-               return 0;
+               svc_rdma_put_context(ctxt, 0);
+               return -ENOTCONN;
        }
 
        /* Prepare the context */