diff options
Diffstat (limited to 'net/sunrpc')
-rw-r--r-- | net/sunrpc/xprt.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/net/sunrpc/xprt.c b/net/sunrpc/xprt.c index 2b8789cf8db1..eca92405948f 100644 --- a/net/sunrpc/xprt.c +++ b/net/sunrpc/xprt.c | |||
@@ -569,8 +569,11 @@ void xprt_connect(struct rpc_task *task) | |||
569 | if (xprt->sock != NULL) | 569 | if (xprt->sock != NULL) |
570 | schedule_delayed_work(&xprt->sock_connect, | 570 | schedule_delayed_work(&xprt->sock_connect, |
571 | RPC_REESTABLISH_TIMEOUT); | 571 | RPC_REESTABLISH_TIMEOUT); |
572 | else | 572 | else { |
573 | schedule_work(&xprt->sock_connect); | 573 | schedule_work(&xprt->sock_connect); |
574 | if (!RPC_IS_ASYNC(task)) | ||
575 | flush_scheduled_work(); | ||
576 | } | ||
574 | } | 577 | } |
575 | return; | 578 | return; |
576 | out_write: | 579 | out_write: |
@@ -1685,6 +1688,10 @@ xprt_shutdown(struct rpc_xprt *xprt) | |||
1685 | rpc_wake_up(&xprt->backlog); | 1688 | rpc_wake_up(&xprt->backlog); |
1686 | wake_up(&xprt->cong_wait); | 1689 | wake_up(&xprt->cong_wait); |
1687 | del_timer_sync(&xprt->timer); | 1690 | del_timer_sync(&xprt->timer); |
1691 | |||
1692 | /* synchronously wait for connect worker to finish */ | ||
1693 | cancel_delayed_work(&xprt->sock_connect); | ||
1694 | flush_scheduled_work(); | ||
1688 | } | 1695 | } |
1689 | 1696 | ||
1690 | /* | 1697 | /* |