dect
/
linux-2.6
Archived
13
0
Fork 0

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>
This commit is contained in:
Tom Tucker 2008-04-25 18:08:59 -05:00
parent 05a0826a6e
commit 5ac461a6f0
1 changed files with 2 additions and 1 deletions

View 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 */