Skip to content

Commit e66721f

Browse files
trondmyamschuma-ntap
authored andcommitted
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>
1 parent 45ac486 commit e66721f

File tree

2 files changed

+1
-1
lines changed

2 files changed

+1
-1
lines changed

net/sunrpc/clnt.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1739,7 +1739,6 @@ rpc_xdr_encode(struct rpc_task *task)
17391739
xdr_buf_init(&req->rq_rcv_buf,
17401740
req->rq_rbuffer,
17411741
req->rq_rcvsize);
1742-
req->rq_bytes_sent = 0;
17431742

17441743
p = rpc_encode_header(task);
17451744
if (p == NULL) {

net/sunrpc/xprt.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1151,6 +1151,7 @@ xprt_request_enqueue_transmit(struct rpc_task *task)
11511151
struct rpc_xprt *xprt = req->rq_xprt;
11521152

11531153
if (xprt_request_need_enqueue_transmit(task, req)) {
1154+
req->rq_bytes_sent = 0;
11541155
spin_lock(&xprt->queue_lock);
11551156
/*
11561157
* Requests that carry congestion control credits are added

0 commit comments

Comments
 (0)