Commit ec37a58f authored by Trond Myklebust's avatar Trond Myklebust

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: default avatarTrond Myklebust <trond.myklebust@hammerspace.com>
parent 5ce97039
...@@ -1079,13 +1079,10 @@ void xprt_transmit(struct rpc_task *task) ...@@ -1079,13 +1079,10 @@ void xprt_transmit(struct rpc_task *task)
spin_lock(&xprt->recv_lock); spin_lock(&xprt->recv_lock);
if (test_bit(RPC_TASK_NEED_RECV, &task->tk_runstate)) { if (test_bit(RPC_TASK_NEED_RECV, &task->tk_runstate)) {
rpc_sleep_on(&xprt->pending, task, xprt_timer); rpc_sleep_on(&xprt->pending, task, xprt_timer);
/* /* Wake up immediately if the connection was dropped */
* Send an extra queue wakeup call if the
* connection was dropped in case the call to
* rpc_sleep_on() raced.
*/
if (!xprt_connected(xprt)) 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); spin_unlock(&xprt->recv_lock);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment