diff mbox

SUNRPC: Remove resource leak in svc_rdma_send_error()

Message ID alpine.LNX.2.00.1101222233260.7746@swampdragon.chaosbits.net
State Accepted, archived
Delegated to: Trond Myklebust
Headers show

Commit Message

Jesper Juhl Jan. 22, 2011, 9:40 p.m. UTC
None
diff mbox

Patch

diff --git a/net/sunrpc/xprtrdma/svc_rdma_transport.c b/net/sunrpc/xprtrdma/svc_rdma_transport.c
index 9df1ead..1a10dcd 100644
--- a/net/sunrpc/xprtrdma/svc_rdma_transport.c
+++ b/net/sunrpc/xprtrdma/svc_rdma_transport.c
@@ -1335,6 +1335,7 @@  void svc_rdma_send_error(struct svcxprt_rdma *xprt, struct rpcrdma_msg *rmsgp,
 					    p, 0, length, DMA_FROM_DEVICE);
 	if (ib_dma_mapping_error(xprt->sc_cm_id->device, ctxt->sge[0].addr)) {
 		put_page(p);
+		svc_rdma_put_context(ctxt, 1);
 		return;
 	}
 	atomic_inc(&xprt->sc_dma_used);