Commit fda13939 authored by Trond Myklebust's avatar Trond Myklebust

SUNRPC: Convert users of rpc_wake_up_task to use rpc_wake_up_queued_task

Signed-off-by: default avatarTrond Myklebust <Trond.Myklebust@netapp.com>
parent 96ef13b2
...@@ -2768,7 +2768,7 @@ nfs4_async_handle_error(struct rpc_task *task, const struct nfs_server *server) ...@@ -2768,7 +2768,7 @@ nfs4_async_handle_error(struct rpc_task *task, const struct nfs_server *server)
rpc_sleep_on(&clp->cl_rpcwaitq, task, NULL, NULL); rpc_sleep_on(&clp->cl_rpcwaitq, task, NULL, NULL);
nfs4_schedule_state_recovery(clp); nfs4_schedule_state_recovery(clp);
if (test_bit(NFS4CLNT_STATE_RECOVER, &clp->cl_state) == 0) if (test_bit(NFS4CLNT_STATE_RECOVER, &clp->cl_state) == 0)
rpc_wake_up_task(task); rpc_wake_up_queued_task(&clp->cl_rpcwaitq, task);
task->tk_status = 0; task->tk_status = 0;
return -EAGAIN; return -EAGAIN;
case -NFS4ERR_DELAY: case -NFS4ERR_DELAY:
......
...@@ -232,7 +232,6 @@ void rpc_init_priority_wait_queue(struct rpc_wait_queue *, const char *); ...@@ -232,7 +232,6 @@ void rpc_init_priority_wait_queue(struct rpc_wait_queue *, const char *);
void rpc_init_wait_queue(struct rpc_wait_queue *, const char *); void rpc_init_wait_queue(struct rpc_wait_queue *, const char *);
void rpc_sleep_on(struct rpc_wait_queue *, struct rpc_task *, void rpc_sleep_on(struct rpc_wait_queue *, struct rpc_task *,
rpc_action action, rpc_action timer); rpc_action action, rpc_action timer);
void rpc_wake_up_task(struct rpc_task *);
void rpc_wake_up_queued_task(struct rpc_wait_queue *, void rpc_wake_up_queued_task(struct rpc_wait_queue *,
struct rpc_task *); struct rpc_task *);
void rpc_wake_up(struct rpc_wait_queue *); void rpc_wake_up(struct rpc_wait_queue *);
......
...@@ -1066,7 +1066,7 @@ call_transmit(struct rpc_task *task) ...@@ -1066,7 +1066,7 @@ call_transmit(struct rpc_task *task)
if (task->tk_msg.rpc_proc->p_decode != NULL) if (task->tk_msg.rpc_proc->p_decode != NULL)
return; return;
task->tk_action = rpc_exit_task; task->tk_action = rpc_exit_task;
rpc_wake_up_task(task); rpc_wake_up_queued_task(&task->tk_xprt->pending, task);
} }
/* /*
......
...@@ -417,11 +417,10 @@ EXPORT_SYMBOL_GPL(rpc_wake_up_queued_task); ...@@ -417,11 +417,10 @@ EXPORT_SYMBOL_GPL(rpc_wake_up_queued_task);
/* /*
* Wake up the specified task * Wake up the specified task
*/ */
void rpc_wake_up_task(struct rpc_task *task) static void rpc_wake_up_task(struct rpc_task *task)
{ {
rpc_wake_up_queued_task(task->tk_waitqueue, task); rpc_wake_up_queued_task(task->tk_waitqueue, task);
} }
EXPORT_SYMBOL_GPL(rpc_wake_up_task);
/* /*
* Wake up the next task on a priority queue. * Wake up the next task on a priority queue.
......
...@@ -472,7 +472,7 @@ void xprt_write_space(struct rpc_xprt *xprt) ...@@ -472,7 +472,7 @@ void xprt_write_space(struct rpc_xprt *xprt)
if (xprt->snd_task) { if (xprt->snd_task) {
dprintk("RPC: write space: waking waiting task on " dprintk("RPC: write space: waking waiting task on "
"xprt %p\n", xprt); "xprt %p\n", xprt);
rpc_wake_up_task(xprt->snd_task); rpc_wake_up_queued_task(&xprt->pending, xprt->snd_task);
} }
spin_unlock_bh(&xprt->transport_lock); spin_unlock_bh(&xprt->transport_lock);
} }
...@@ -602,8 +602,7 @@ void xprt_force_disconnect(struct rpc_xprt *xprt) ...@@ -602,8 +602,7 @@ void xprt_force_disconnect(struct rpc_xprt *xprt)
/* Try to schedule an autoclose RPC call */ /* Try to schedule an autoclose RPC call */
if (test_and_set_bit(XPRT_LOCKED, &xprt->state) == 0) if (test_and_set_bit(XPRT_LOCKED, &xprt->state) == 0)
queue_work(rpciod_workqueue, &xprt->task_cleanup); queue_work(rpciod_workqueue, &xprt->task_cleanup);
else if (xprt->snd_task != NULL) xprt_wake_pending_tasks(xprt, -ENOTCONN);
rpc_wake_up_task(xprt->snd_task);
spin_unlock_bh(&xprt->transport_lock); spin_unlock_bh(&xprt->transport_lock);
} }
EXPORT_SYMBOL_GPL(xprt_force_disconnect); EXPORT_SYMBOL_GPL(xprt_force_disconnect);
...@@ -749,18 +748,19 @@ EXPORT_SYMBOL_GPL(xprt_update_rtt); ...@@ -749,18 +748,19 @@ EXPORT_SYMBOL_GPL(xprt_update_rtt);
void xprt_complete_rqst(struct rpc_task *task, int copied) void xprt_complete_rqst(struct rpc_task *task, int copied)
{ {
struct rpc_rqst *req = task->tk_rqstp; struct rpc_rqst *req = task->tk_rqstp;
struct rpc_xprt *xprt = req->rq_xprt;
dprintk("RPC: %5u xid %08x complete (%d bytes received)\n", dprintk("RPC: %5u xid %08x complete (%d bytes received)\n",
task->tk_pid, ntohl(req->rq_xid), copied); task->tk_pid, ntohl(req->rq_xid), copied);
task->tk_xprt->stat.recvs++; xprt->stat.recvs++;
task->tk_rtt = (long)jiffies - req->rq_xtime; task->tk_rtt = (long)jiffies - req->rq_xtime;
list_del_init(&req->rq_list); list_del_init(&req->rq_list);
/* Ensure all writes are done before we update req->rq_received */ /* Ensure all writes are done before we update req->rq_received */
smp_wmb(); smp_wmb();
req->rq_received = req->rq_private_buf.len = copied; req->rq_received = req->rq_private_buf.len = copied;
rpc_wake_up_task(task); rpc_wake_up_queued_task(&xprt->pending, task);
} }
EXPORT_SYMBOL_GPL(xprt_complete_rqst); EXPORT_SYMBOL_GPL(xprt_complete_rqst);
......
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