]> git.hungrycats.org Git - linux/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:33:25 +0000 (20:33 -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 5abab094441f97cbe8dd7f91dcd554579030b6be..8d02e050ac39d439b005ef684a6ad5bf7a312829 100644 (file)
@@ -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