From: Trond Myklebust Date: Fri, 28 Aug 2009 15:12:12 +0000 (-0400) Subject: SUNRPC: Fix rpc_task_force_reencode X-Git-Tag: v2.6.30.6~56 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=820eeda9c642baf97f908b042b9dc3c6c0bf8995;p=thirdparty%2Fkernel%2Fstable.git SUNRPC: Fix rpc_task_force_reencode commit 2574cc9f4ffc6c681c9177111357efe5b76f0e36 upstream. This patch fixes the bug that was reported in http://bugzilla.kernel.org/show_bug.cgi?id=14053 If we're in the case where we need to force a reencode and then resend of the RPC request, due to xprt_transmit failing with a networking error, then we _must_ retransmit the entire request. Signed-off-by: Trond Myklebust Signed-off-by: Linus Torvalds Signed-off-by: Greg Kroah-Hartman --- diff --git a/net/sunrpc/clnt.c b/net/sunrpc/clnt.c index 5abab094441f9..8d02e050ac39d 100644 --- a/net/sunrpc/clnt.c +++ b/net/sunrpc/clnt.c @@ -876,6 +876,7 @@ static inline void rpc_task_force_reencode(struct rpc_task *task) { task->tk_rqstp->rq_snd_buf.len = 0; + task->tk_rqstp->rq_bytes_sent = 0; } static inline void