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.27.32~45 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=994e0b57b4ea1ee1726d31a7e669200b34405df7;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 66cfe88339dfe..860b1d4bfd5fd 100644 --- a/net/sunrpc/clnt.c +++ b/net/sunrpc/clnt.c @@ -860,6 +860,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