From: Trond Myklebust Date: Wed, 14 May 2008 19:48:25 -0700 SUNRPC: Ensure we exit early in case of an encode error Signed-off-by: Trond Myklebust --- net/sunrpc/clnt.c | 9 +++------ 1 files changed, 3 insertions(+), 6 deletions(-) diff --git a/net/sunrpc/clnt.c b/net/sunrpc/clnt.c index 8945307..5a4cb5a 100644 --- a/net/sunrpc/clnt.c +++ b/net/sunrpc/clnt.c @@ -888,11 +888,6 @@ call_encode(struct rpc_task *task) task->tk_status = rpcauth_wrap_req(task, encode, req, p, task->tk_msg.rpc_argp); - if (task->tk_status == -ENOMEM) { - /* XXX: Is this sane? */ - rpc_delay(task, 3*HZ); - task->tk_status = -EAGAIN; - } } /* @@ -1048,8 +1043,10 @@ call_transmit(struct rpc_task *task) BUG_ON(task->tk_rqstp->rq_bytes_sent != 0); call_encode(task); /* Did the encode result in an error condition? */ - if (task->tk_status != 0) + if (task->tk_status != 0) { + rpc_exit(task, task->tk_status); return; + } } xprt_transmit(task); if (task->tk_status < 0)