diff options
author | Chuck Lever <chuck.lever@oracle.com> | 2020-05-09 14:07:13 -0400 |
---|---|---|
committer | Trond Myklebust <trond.myklebust@hammerspace.com> | 2020-05-11 14:06:50 -0400 |
commit | ce99aa62e1eb793e259d023c7f6ccb7c4879917b (patch) | |
tree | eecb41fcd00d2be1aae346e4683d54882a904186 /net | |
parent | 29fe839976266bc7c55b927360a1daae57477723 (diff) | |
download | linux-ce99aa62e1eb793e259d023c7f6ccb7c4879917b.tar.gz linux-ce99aa62e1eb793e259d023c7f6ccb7c4879917b.tar.bz2 linux-ce99aa62e1eb793e259d023c7f6ccb7c4879917b.zip |
SUNRPC: Signalled ASYNC tasks need to exit
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>
Diffstat (limited to 'net')
-rw-r--r-- | net/sunrpc/clnt.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/net/sunrpc/clnt.c b/net/sunrpc/clnt.c index 8d3972ea688b..c74bc402f8c7 100644 --- a/net/sunrpc/clnt.c +++ b/net/sunrpc/clnt.c @@ -2433,6 +2433,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; |