diff options
Diffstat (limited to 'net')
-rw-r--r-- | net/sunrpc/clnt.c | 2 | ||||
-rw-r--r-- | net/sunrpc/xprt.c | 10 |
2 files changed, 12 insertions, 0 deletions
diff --git a/net/sunrpc/clnt.c b/net/sunrpc/clnt.c index 393e70aee181..c21aa0a7f770 100644 --- a/net/sunrpc/clnt.c +++ b/net/sunrpc/clnt.c | |||
@@ -249,6 +249,8 @@ struct rpc_clnt *rpc_create(struct rpc_create_args *args) | |||
249 | clnt->cl_autobind = 1; | 249 | clnt->cl_autobind = 1; |
250 | if (args->flags & RPC_CLNT_CREATE_ONESHOT) | 250 | if (args->flags & RPC_CLNT_CREATE_ONESHOT) |
251 | clnt->cl_oneshot = 1; | 251 | clnt->cl_oneshot = 1; |
252 | if (args->flags & RPC_CLNT_CREATE_DISCRTRY) | ||
253 | clnt->cl_discrtry = 1; | ||
252 | 254 | ||
253 | return clnt; | 255 | return clnt; |
254 | } | 256 | } |
diff --git a/net/sunrpc/xprt.c b/net/sunrpc/xprt.c index cf59f7d315d0..1975139b26e7 100644 --- a/net/sunrpc/xprt.c +++ b/net/sunrpc/xprt.c | |||
@@ -735,6 +735,16 @@ void xprt_transmit(struct rpc_task *task) | |||
735 | xprt_reset_majortimeo(req); | 735 | xprt_reset_majortimeo(req); |
736 | /* Turn off autodisconnect */ | 736 | /* Turn off autodisconnect */ |
737 | del_singleshot_timer_sync(&xprt->timer); | 737 | del_singleshot_timer_sync(&xprt->timer); |
738 | } else { | ||
739 | /* If all request bytes have been sent, | ||
740 | * then we must be retransmitting this one */ | ||
741 | if (!req->rq_bytes_sent) { | ||
742 | if (task->tk_client->cl_discrtry) { | ||
743 | xprt_disconnect(xprt); | ||
744 | task->tk_status = -ENOTCONN; | ||
745 | return; | ||
746 | } | ||
747 | } | ||
738 | } | 748 | } |
739 | } else if (!req->rq_bytes_sent) | 749 | } else if (!req->rq_bytes_sent) |
740 | return; | 750 | return; |