Skip to content

Commit 59464b2

Browse files
author
Trond Myklebust
committed
SUNRPC: SOFTCONN tasks should time out when on the sending list
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 <[email protected]>
1 parent f663507 commit 59464b2

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

net/sunrpc/xprt.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -283,7 +283,7 @@ int xprt_reserve_xprt(struct rpc_xprt *xprt, struct rpc_task *task)
283283
xprt_clear_locked(xprt);
284284
out_sleep:
285285
task->tk_status = -EAGAIN;
286-
if (RPC_IS_SOFT(task))
286+
if (RPC_IS_SOFT(task) || RPC_IS_SOFTCONN(task))
287287
rpc_sleep_on_timeout(&xprt->sending, task, NULL,
288288
xprt_request_timeout(req));
289289
else
@@ -349,7 +349,7 @@ int xprt_reserve_xprt_cong(struct rpc_xprt *xprt, struct rpc_task *task)
349349
xprt_clear_locked(xprt);
350350
out_sleep:
351351
task->tk_status = -EAGAIN;
352-
if (RPC_IS_SOFT(task))
352+
if (RPC_IS_SOFT(task) || RPC_IS_SOFTCONN(task))
353353
rpc_sleep_on_timeout(&xprt->sending, task, NULL,
354354
xprt_request_timeout(req));
355355
else

0 commit comments

Comments
 (0)