Commit a00fd241 authored by Trond Myklebust's avatar Trond Myklebust Committed by Greg Kroah-Hartman

SUNRPC: Ensure rq_bytes_sent is reset before request transmission

[ Upstream commit e66721f0 ]

When we resend a request, ensure that the 'rq_bytes_sent' is reset
to zero.
Signed-off-by: 's avatarTrond Myklebust <trond.myklebust@hammerspace.com>
Signed-off-by: 's avatarAnna Schumaker <Anna.Schumaker@Netapp.com>
Signed-off-by: 's avatarSasha Levin <sashal@kernel.org>
parent 217dd7c4
......@@ -1738,7 +1738,6 @@ rpc_xdr_encode(struct rpc_task *task)
xdr_buf_init(&req->rq_rcv_buf,
req->rq_rbuffer,
req->rq_rcvsize);
req->rq_bytes_sent = 0;
p = rpc_encode_header(task);
if (p == NULL) {
......
......@@ -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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment