]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
svcrdma: Free context on ib_post_recv error
authorTom Tucker <tom@opengridcomputing.com>
Fri, 25 Apr 2008 19:11:31 +0000 (14:11 -0500)
committerTom Tucker <tom@opengridcomputing.com>
Mon, 19 May 2008 12:33:47 +0000 (07:33 -0500)
If there is an error posting the recv WR to the RQ, free the
context associated with the WR. This would leak a context when
asynchronous errors occurred on the transport while conccurent threads
were processing their RPC.

Signed-off-by: Tom Tucker <tom@opengridcomputing.com>
net/sunrpc/xprtrdma/svc_rdma_transport.c

index 4bf8b5ad1675a34ab7e0d482071b397be7844966..e85ac77f4954860a5bbe5c5f8b5652ea2f31fe0e 100644 (file)
@@ -524,6 +524,8 @@ int svc_rdma_post_recv(struct svcxprt_rdma *xprt)
        recv_wr.wr_id = (u64)(unsigned long)ctxt;
 
        ret = ib_post_recv(xprt->sc_qp, &recv_wr, &bad_recv_wr);
+       if (ret)
+               svc_rdma_put_context(ctxt, 1);
        return ret;
 }