diff options
Diffstat (limited to 'net/sunrpc/xprt.c')
-rw-r--r-- | net/sunrpc/xprt.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/net/sunrpc/xprt.c b/net/sunrpc/xprt.c index 96c212ddc41a..6e2772217e55 100644 --- a/net/sunrpc/xprt.c +++ b/net/sunrpc/xprt.c | |||
@@ -472,7 +472,7 @@ void xprt_write_space(struct rpc_xprt *xprt) | |||
472 | if (xprt->snd_task) { | 472 | if (xprt->snd_task) { |
473 | dprintk("RPC: write space: waking waiting task on " | 473 | dprintk("RPC: write space: waking waiting task on " |
474 | "xprt %p\n", xprt); | 474 | "xprt %p\n", xprt); |
475 | rpc_wake_up_task(xprt->snd_task); | 475 | rpc_wake_up_queued_task(&xprt->pending, xprt->snd_task); |
476 | } | 476 | } |
477 | spin_unlock_bh(&xprt->transport_lock); | 477 | spin_unlock_bh(&xprt->transport_lock); |
478 | } | 478 | } |
@@ -602,8 +602,7 @@ void xprt_force_disconnect(struct rpc_xprt *xprt) | |||
602 | /* Try to schedule an autoclose RPC call */ | 602 | /* Try to schedule an autoclose RPC call */ |
603 | if (test_and_set_bit(XPRT_LOCKED, &xprt->state) == 0) | 603 | if (test_and_set_bit(XPRT_LOCKED, &xprt->state) == 0) |
604 | queue_work(rpciod_workqueue, &xprt->task_cleanup); | 604 | queue_work(rpciod_workqueue, &xprt->task_cleanup); |
605 | else if (xprt->snd_task != NULL) | 605 | xprt_wake_pending_tasks(xprt, -ENOTCONN); |
606 | rpc_wake_up_task(xprt->snd_task); | ||
607 | spin_unlock_bh(&xprt->transport_lock); | 606 | spin_unlock_bh(&xprt->transport_lock); |
608 | } | 607 | } |
609 | EXPORT_SYMBOL_GPL(xprt_force_disconnect); | 608 | EXPORT_SYMBOL_GPL(xprt_force_disconnect); |
@@ -749,18 +748,19 @@ EXPORT_SYMBOL_GPL(xprt_update_rtt); | |||
749 | void xprt_complete_rqst(struct rpc_task *task, int copied) | 748 | void xprt_complete_rqst(struct rpc_task *task, int copied) |
750 | { | 749 | { |
751 | struct rpc_rqst *req = task->tk_rqstp; | 750 | struct rpc_rqst *req = task->tk_rqstp; |
751 | struct rpc_xprt *xprt = req->rq_xprt; | ||
752 | 752 | ||
753 | dprintk("RPC: %5u xid %08x complete (%d bytes received)\n", | 753 | dprintk("RPC: %5u xid %08x complete (%d bytes received)\n", |
754 | task->tk_pid, ntohl(req->rq_xid), copied); | 754 | task->tk_pid, ntohl(req->rq_xid), copied); |
755 | 755 | ||
756 | task->tk_xprt->stat.recvs++; | 756 | xprt->stat.recvs++; |
757 | task->tk_rtt = (long)jiffies - req->rq_xtime; | 757 | task->tk_rtt = (long)jiffies - req->rq_xtime; |
758 | 758 | ||
759 | list_del_init(&req->rq_list); | 759 | list_del_init(&req->rq_list); |
760 | /* Ensure all writes are done before we update req->rq_received */ | 760 | /* Ensure all writes are done before we update req->rq_received */ |
761 | smp_wmb(); | 761 | smp_wmb(); |
762 | req->rq_received = req->rq_private_buf.len = copied; | 762 | req->rq_received = req->rq_private_buf.len = copied; |
763 | rpc_wake_up_task(task); | 763 | rpc_wake_up_queued_task(&xprt->pending, task); |
764 | } | 764 | } |
765 | EXPORT_SYMBOL_GPL(xprt_complete_rqst); | 765 | EXPORT_SYMBOL_GPL(xprt_complete_rqst); |
766 | 766 | ||