]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
SUNRPC: Fix rpc_task_force_reencode
authorTrond Myklebust <Trond.Myklebust@netapp.com>
Fri, 28 Aug 2009 15:12:12 +0000 (11:12 -0400)
committerGreg Kroah-Hartman <gregkh@suse.de>
Wed, 9 Sep 2009 03:16:57 +0000 (20:16 -0700)
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 <Trond.Myklebust@netapp.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
net/sunrpc/clnt.c

index 66cfe88339dfeca11327bcbc1678f362464c370e..860b1d4bfd5fd1bafbf7a30a0837fb10c2e2464e 100644 (file)
@@ -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