aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorTom Tucker <tom@opengridcomputing.com>2008-04-25 19:08:59 -0400
committerTom Tucker <tom@opengridcomputing.com>2008-05-19 08:33:47 -0400
commit5ac461a6f05499fa233ea43b1de80b679d1eec21 (patch)
tree2c49a3c2338e1bcea424fe2ea99ed373741bbe0c /net
parent05a0826a6e6d95ab6e9c3e4a10b58e10f233cc2b (diff)
svcrdma: Free context on post_recv error in send_reply
If an error is encountered trying to post a recv buffer in send_reply, free the passed in context. Return an error to the caller so it is aware that the request was not posted. Signed-off-by: Tom Tucker <tom@opengridcomputing.com>
Diffstat (limited to 'net')
-rw-r--r--net/sunrpc/xprtrdma/svc_rdma_sendto.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/net/sunrpc/xprtrdma/svc_rdma_sendto.c b/net/sunrpc/xprtrdma/svc_rdma_sendto.c
index f61d7bd105fb..fb82b1b683f8 100644
--- a/net/sunrpc/xprtrdma/svc_rdma_sendto.c
+++ b/net/sunrpc/xprtrdma/svc_rdma_sendto.c
@@ -396,7 +396,8 @@ static int send_reply(struct svcxprt_rdma *rdma,
396 "svcrdma: could not post a receive buffer, err=%d." 396 "svcrdma: could not post a receive buffer, err=%d."
397 "Closing transport %p.\n", ret, rdma); 397 "Closing transport %p.\n", ret, rdma);
398 set_bit(XPT_CLOSE, &rdma->sc_xprt.xpt_flags); 398 set_bit(XPT_CLOSE, &rdma->sc_xprt.xpt_flags);
399 return 0; 399 svc_rdma_put_context(ctxt, 0);
400 return -ENOTCONN;
400 } 401 }
401 402
402 /* Prepare the context */ 403 /* Prepare the context */