summaryrefslogtreecommitdiff
path: root/net/sunrpc/xprtsock.c
diff options
context:
space:
mode:
authorTrond Myklebust <trond.myklebust@hammerspace.com>2019-01-02 15:54:42 -0500
committerTrond Myklebust <trond.myklebust@hammerspace.com>2019-02-20 17:33:55 -0500
commitb9779a54bb224cd2a993c9bf8a1910a7494c062e (patch)
treeb330949b2d848cf7fac5650f18bbfff6e1330b11 /net/sunrpc/xprtsock.c
parent0ffe86f48026b7f34db22d1004bc9992f0db8b33 (diff)
downloadlwn-b9779a54bb224cd2a993c9bf8a1910a7494c062e.tar.gz
lwn-b9779a54bb224cd2a993c9bf8a1910a7494c062e.zip
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>
Diffstat (limited to 'net/sunrpc/xprtsock.c')
-rw-r--r--net/sunrpc/xprtsock.c2
1 files changed, 0 insertions, 2 deletions
diff --git a/net/sunrpc/xprtsock.c b/net/sunrpc/xprtsock.c
index da45bb1e931e..5d22c175c7dd 100644
--- a/net/sunrpc/xprtsock.c
+++ b/net/sunrpc/xprtsock.c
@@ -951,7 +951,6 @@ static int xs_local_send_request(struct rpc_rqst *req)
req->rq_bytes_sent = transport->xmit.offset;
if (likely(req->rq_bytes_sent >= req->rq_slen)) {
req->rq_xmit_bytes_sent += transport->xmit.offset;
- req->rq_bytes_sent = 0;
transport->xmit.offset = 0;
return 0;
}
@@ -1117,7 +1116,6 @@ static int xs_tcp_send_request(struct rpc_rqst *req)
req->rq_bytes_sent = transport->xmit.offset;
if (likely(req->rq_bytes_sent >= req->rq_slen)) {
req->rq_xmit_bytes_sent += transport->xmit.offset;
- req->rq_bytes_sent = 0;
transport->xmit.offset = 0;
return 0;
}