]> git.proxmox.com Git - mirror_ubuntu-disco-kernel.git/commitdiff
SUNRPC: Ensure rq_bytes_sent is reset before request transmission
authorTrond Myklebust <trondmy@gmail.com>
Wed, 2 Jan 2019 22:53:10 +0000 (17:53 -0500)
committerAnna Schumaker <Anna.Schumaker@Netapp.com>
Tue, 15 Jan 2019 20:28:18 +0000 (15:28 -0500)
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>
net/sunrpc/clnt.c
net/sunrpc/xprt.c

index 71d9599b5816591bd12751703d8487a8dda688a4..0878c793ce7fd65430f899562f0c885d28f4a05e 100644 (file)
@@ -1739,7 +1739,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) {
index 73547d17d3c61a844c860c33acaff5259c81d54e..9075ae150ae560777969d393e31a691fe663edda 100644 (file)
@@ -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