Commit e66721f0 authored by Trond Myklebust's avatar Trond Myklebust Committed by Anna Schumaker

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: default avatarTrond Myklebust <trond.myklebust@hammerspace.com>
Signed-off-by: default avatarAnna Schumaker <Anna.Schumaker@Netapp.com>
parent 45ac486e
...@@ -1739,7 +1739,6 @@ rpc_xdr_encode(struct rpc_task *task) ...@@ -1739,7 +1739,6 @@ rpc_xdr_encode(struct rpc_task *task)
xdr_buf_init(&req->rq_rcv_buf, xdr_buf_init(&req->rq_rcv_buf,
req->rq_rbuffer, req->rq_rbuffer,
req->rq_rcvsize); req->rq_rcvsize);
req->rq_bytes_sent = 0;
p = rpc_encode_header(task); p = rpc_encode_header(task);
if (p == NULL) { if (p == NULL) {
......
...@@ -1151,6 +1151,7 @@ xprt_request_enqueue_transmit(struct rpc_task *task) ...@@ -1151,6 +1151,7 @@ xprt_request_enqueue_transmit(struct rpc_task *task)
struct rpc_xprt *xprt = req->rq_xprt; struct rpc_xprt *xprt = req->rq_xprt;
if (xprt_request_need_enqueue_transmit(task, req)) { if (xprt_request_need_enqueue_transmit(task, req)) {
req->rq_bytes_sent = 0;
spin_lock(&xprt->queue_lock); spin_lock(&xprt->queue_lock);
/* /*
* Requests that carry congestion control credits are added * 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