]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
SUNRPC: SOFTCONN tasks should time out when on the sending list
authorTrond Myklebust <trond.myklebust@hammerspace.com>
Sun, 17 Sep 2023 18:59:40 +0000 (14:59 -0400)
committerTrond Myklebust <trond.myklebust@hammerspace.com>
Sun, 22 Oct 2023 23:47:57 +0000 (19:47 -0400)
SOFTCONN tasks need to periodically check if the transport is still
connected, so that they can time out if that is not the case.

Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
net/sunrpc/xprt.c

index ab453ede54f0cd7be590495952a3feb71d92aef1..2364c485540c66fd32ba089bb014628842b468a4 100644 (file)
@@ -283,7 +283,7 @@ out_unlock:
        xprt_clear_locked(xprt);
 out_sleep:
        task->tk_status = -EAGAIN;
-       if  (RPC_IS_SOFT(task))
+       if (RPC_IS_SOFT(task) || RPC_IS_SOFTCONN(task))
                rpc_sleep_on_timeout(&xprt->sending, task, NULL,
                                xprt_request_timeout(req));
        else
@@ -349,7 +349,7 @@ out_unlock:
        xprt_clear_locked(xprt);
 out_sleep:
        task->tk_status = -EAGAIN;
-       if (RPC_IS_SOFT(task))
+       if (RPC_IS_SOFT(task) || RPC_IS_SOFTCONN(task))
                rpc_sleep_on_timeout(&xprt->sending, task, NULL,
                                xprt_request_timeout(req));
        else