diff options
author | Tom Tucker <tom@opengridcomputing.com> | 2008-04-25 15:11:31 -0400 |
---|---|---|
committer | Tom Tucker <tom@opengridcomputing.com> | 2008-05-19 08:33:47 -0400 |
commit | 05a0826a6e6d95ab6e9c3e4a10b58e10f233cc2b (patch) | |
tree | 85355af360f6da6410bee37ba662c59b58e928d4 /net | |
parent | 120693d12cde0cc735d784c951b53381efec918f (diff) |
svcrdma: Free context on ib_post_recv error
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>
Diffstat (limited to 'net')
-rw-r--r-- | net/sunrpc/xprtrdma/svc_rdma_transport.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/net/sunrpc/xprtrdma/svc_rdma_transport.c b/net/sunrpc/xprtrdma/svc_rdma_transport.c index 4bf8b5ad1675..e85ac77f4954 100644 --- a/net/sunrpc/xprtrdma/svc_rdma_transport.c +++ b/net/sunrpc/xprtrdma/svc_rdma_transport.c | |||
@@ -524,6 +524,8 @@ int svc_rdma_post_recv(struct svcxprt_rdma *xprt) | |||
524 | recv_wr.wr_id = (u64)(unsigned long)ctxt; | 524 | recv_wr.wr_id = (u64)(unsigned long)ctxt; |
525 | 525 | ||
526 | ret = ib_post_recv(xprt->sc_qp, &recv_wr, &bad_recv_wr); | 526 | ret = ib_post_recv(xprt->sc_qp, &recv_wr, &bad_recv_wr); |
527 | if (ret) | ||
528 | svc_rdma_put_context(ctxt, 1); | ||
527 | return ret; | 529 | return ret; |
528 | } | 530 | } |
529 | 531 | ||