lkml.org 
[lkml]   [2020]   [May]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH 5.6 107/194] SUNRPC: Signalled ASYNC tasks need to exit
    Date
    From: Chuck Lever <chuck.lever@oracle.com>

    [ Upstream commit ce99aa62e1eb793e259d023c7f6ccb7c4879917b ]

    Ensure that signalled ASYNC rpc_tasks exit immediately instead of
    spinning until a timeout (or forever).

    To avoid checking for the signal flag on every scheduler iteration,
    the check is instead introduced in the client's finite state
    machine.

    Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
    Fixes: ae67bd3821bb ("SUNRPC: Fix up task signalling")
    Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
    Signed-off-by: Sasha Levin <sashal@kernel.org>
    ---
    net/sunrpc/clnt.c | 5 +++++
    1 file changed, 5 insertions(+)

    diff --git a/net/sunrpc/clnt.c b/net/sunrpc/clnt.c
    index 7324b21f923e6..3ceaefb2f0bcf 100644
    --- a/net/sunrpc/clnt.c
    +++ b/net/sunrpc/clnt.c
    @@ -2416,6 +2416,11 @@ rpc_check_timeout(struct rpc_task *task)
    {
    struct rpc_clnt *clnt = task->tk_client;

    + if (RPC_SIGNALLED(task)) {
    + rpc_call_rpcerror(task, -ERESTARTSYS);
    + return;
    + }
    +
    if (xprt_adjust_timeout(task->tk_rqstp) == 0)
    return;

    --
    2.20.1


    \
     
     \ /
      Last update: 2020-05-18 20:04    [W:2.404 / U:0.312 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site