diff options
author | Trond Myklebust <trond.myklebust@hammerspace.com> | 2019-01-02 21:54:42 +0100 |
---|---|---|
committer | Trond Myklebust <trond.myklebust@hammerspace.com> | 2019-02-20 23:33:55 +0100 |
commit | b9779a54bb224cd2a993c9bf8a1910a7494c062e (patch) | |
tree | b330949b2d848cf7fac5650f18bbfff6e1330b11 /net/sunrpc/xprtsock.c | |
parent | SUNRPC: Use poll() to fix up the socket requeue races (diff) | |
download | linux-b9779a54bb224cd2a993c9bf8a1910a7494c062e.tar.xz linux-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.c | 2 |
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; } |