mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-21 01:51:18 +00:00
SUNRPC: Signalled ASYNC tasks need to exit
[ Upstream commitce99aa62e1
] 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:ae67bd3821
("SUNRPC: Fix up task signalling") Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com> Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
parent
d1538d8d63
commit
6259b1c1bc
1 changed files with 5 additions and 0 deletions
|
@ -2422,6 +2422,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;
|
||||
|
||||
|
|
Loading…
Reference in a new issue