summaryrefslogtreecommitdiffstats
path: root/net/sunrpc
diff options
context:
space:
mode:
authorTrond Myklebust <trond.myklebust@hammerspace.com>2018-08-29 09:30:19 -0400
committerTrond Myklebust <trond.myklebust@hammerspace.com>2018-09-30 15:35:14 -0400
commitec37a58fba289d53f35442ad0ef3b469412efd20 (patch)
treefea873bf755f2cda229c8aa07d5667db8b701015 /net/sunrpc
parent5ce970393bad41499d50dfaea525ac8f01cdbc30 (diff)
downloadlinux-ec37a58fba289d53f35442ad0ef3b469412efd20.tar.gz
linux-ec37a58fba289d53f35442ad0ef3b469412efd20.tar.bz2
linux-ec37a58fba289d53f35442ad0ef3b469412efd20.zip
SUNRPC: Don't wake queued RPC calls multiple times in xprt_transmit
Rather than waking up the entire queue of RPC messages a second time, just wake up the task that was put to sleep. Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
Diffstat (limited to 'net/sunrpc')
-rw-r--r--net/sunrpc/xprt.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/net/sunrpc/xprt.c b/net/sunrpc/xprt.c
index 649a40cfae6d..3a3b3445a7c0 100644
--- a/net/sunrpc/xprt.c
+++ b/net/sunrpc/xprt.c
@@ -1079,13 +1079,10 @@ void xprt_transmit(struct rpc_task *task)
spin_lock(&xprt->recv_lock);
if (test_bit(RPC_TASK_NEED_RECV, &task->tk_runstate)) {
rpc_sleep_on(&xprt->pending, task, xprt_timer);
- /*
- * Send an extra queue wakeup call if the
- * connection was dropped in case the call to
- * rpc_sleep_on() raced.
- */
+ /* Wake up immediately if the connection was dropped */
if (!xprt_connected(xprt))
- xprt_wake_pending_tasks(xprt, -ENOTCONN);
+ rpc_wake_up_queued_task_set_status(&xprt->pending,
+ task, -ENOTCONN);
}
spin_unlock(&xprt->recv_lock);
}