summaryrefslogtreecommitdiff
path: root/net/sunrpc/xprt.c
diff options
context:
space:
mode:
authorTrond Myklebust <trondmy@gmail.com>2019-01-03 01:53:10 +0300
committerAnna Schumaker <Anna.Schumaker@Netapp.com>2019-01-15 23:28:18 +0300
commite66721f0436396f779291a29616858b76bfd9415 (patch)
tree51babcbf00d649f71eea4e17e0f1b336e314ac5b /net/sunrpc/xprt.c
parent45ac486ecf2dc998e25cf32f0cabf2deaad875be (diff)
downloadlinux-e66721f0436396f779291a29616858b76bfd9415.tar.xz
SUNRPC: Ensure rq_bytes_sent is reset before request transmission
When we resend a request, ensure that the 'rq_bytes_sent' is reset to zero. Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com> Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
Diffstat (limited to 'net/sunrpc/xprt.c')
-rw-r--r--net/sunrpc/xprt.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/net/sunrpc/xprt.c b/net/sunrpc/xprt.c
index 73547d17d3c6..9075ae150ae5 100644
--- a/net/sunrpc/xprt.c
+++ b/net/sunrpc/xprt.c
@@ -1151,6 +1151,7 @@ xprt_request_enqueue_transmit(struct rpc_task *task)
struct rpc_xprt *xprt = req->rq_xprt;
if (xprt_request_need_enqueue_transmit(task, req)) {
+ req->rq_bytes_sent = 0;
spin_lock(&xprt->queue_lock);
/*
* Requests that carry congestion control credits are added