summaryrefslogtreecommitdiff
path: root/net/sunrpc/xprt.c
diff options
context:
space:
mode:
authorTrond Myklebust <trond.myklebust@hammerspace.com>2018-09-04 06:11:15 +0300
committerTrond Myklebust <trond.myklebust@hammerspace.com>2018-09-30 22:35:15 +0300
commitf05d54ecf66224e2c585f969aa7b9dbe76a1ec46 (patch)
tree14cd9d1529123b69a715daa181eef5cb1db9cdf0 /net/sunrpc/xprt.c
parent89f90fe1ad8bc7cde7f1859abdc392d02ee952de (diff)
downloadlinux-f05d54ecf66224e2c585f969aa7b9dbe76a1ec46.tar.xz
SUNRPC: Allow soft RPC calls to time out when waiting for the XPRT_LOCK
This no longer causes them to lose their place in the transmission queue. Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
Diffstat (limited to 'net/sunrpc/xprt.c')
-rw-r--r--net/sunrpc/xprt.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/net/sunrpc/xprt.c b/net/sunrpc/xprt.c
index c66030c39fcd..533df198a0e9 100644
--- a/net/sunrpc/xprt.c
+++ b/net/sunrpc/xprt.c
@@ -195,7 +195,7 @@ int xprt_reserve_xprt(struct rpc_xprt *xprt, struct rpc_task *task)
out_sleep:
dprintk("RPC: %5u failed to lock transport %p\n",
task->tk_pid, xprt);
- task->tk_timeout = 0;
+ task->tk_timeout = RPC_IS_SOFT(task) ? req->rq_timeout : 0;
task->tk_status = -EAGAIN;
if (req == NULL)
priority = RPC_PRIORITY_LOW;
@@ -274,7 +274,7 @@ int xprt_reserve_xprt_cong(struct rpc_xprt *xprt, struct rpc_task *task)
xprt_clear_locked(xprt);
out_sleep:
dprintk("RPC: %5u failed to lock transport %p\n", task->tk_pid, xprt);
- task->tk_timeout = 0;
+ task->tk_timeout = RPC_IS_SOFT(task) ? req->rq_timeout : 0;
task->tk_status = -EAGAIN;
if (req == NULL)
priority = RPC_PRIORITY_LOW;