lkml.org 
[lkml]   [2019]   [Feb]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH AUTOSEL 4.20 075/105] SUNRPC: Ensure rq_bytes_sent is reset before request transmission
    Date
    From: Trond Myklebust <trondmy@gmail.com>

    [ Upstream commit e66721f0436396f779291a29616858b76bfd9415 ]

    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>
    Signed-off-by: Sasha Levin <sashal@kernel.org>
    ---
    net/sunrpc/clnt.c | 1 -
    net/sunrpc/xprt.c | 1 +
    2 files changed, 1 insertion(+), 1 deletion(-)

    diff --git a/net/sunrpc/clnt.c b/net/sunrpc/clnt.c
    index 24cbddc44c88..2189fbc4c570 100644
    --- a/net/sunrpc/clnt.c
    +++ b/net/sunrpc/clnt.c
    @@ -1738,7 +1738,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) {
    diff --git a/net/sunrpc/xprt.c b/net/sunrpc/xprt.c
    index 943f08be7c38..f1ec2110efeb 100644
    --- a/net/sunrpc/xprt.c
    +++ b/net/sunrpc/xprt.c
    @@ -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
    --
    2.19.1
    \
     
     \ /
      Last update: 2019-02-13 03:36    [W:4.253 / U:0.056 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site