diff options
author | Trond Myklebust <Trond.Myklebust@netapp.com> | 2013-09-26 10:18:04 -0400 |
---|---|---|
committer | Trond Myklebust <Trond.Myklebust@netapp.com> | 2013-10-01 18:22:10 -0400 |
commit | 8b71798c0d389d4cadc884fc7d68c61ee8cd4f45 (patch) | |
tree | c4e9b7e71ca741ac0f8959c32b80efd9ab9ce12d /net/sunrpc/xprtsock.c | |
parent | 7f260e8575bf53b93b77978c1e39f8e67612759c (diff) |
SUNRPC: Only update the TCP connect cookie on a successful connect
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'net/sunrpc/xprtsock.c')
-rw-r--r-- | net/sunrpc/xprtsock.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/sunrpc/xprtsock.c b/net/sunrpc/xprtsock.c index 208a7634b916..9928ba164d62 100644 --- a/net/sunrpc/xprtsock.c +++ b/net/sunrpc/xprtsock.c | |||
@@ -1511,6 +1511,7 @@ static void xs_tcp_state_change(struct sock *sk) | |||
1511 | transport->tcp_copied = 0; | 1511 | transport->tcp_copied = 0; |
1512 | transport->tcp_flags = | 1512 | transport->tcp_flags = |
1513 | TCP_RCV_COPY_FRAGHDR | TCP_RCV_COPY_XID; | 1513 | TCP_RCV_COPY_FRAGHDR | TCP_RCV_COPY_XID; |
1514 | xprt->connect_cookie++; | ||
1514 | 1515 | ||
1515 | xprt_wake_pending_tasks(xprt, -EAGAIN); | 1516 | xprt_wake_pending_tasks(xprt, -EAGAIN); |
1516 | } | 1517 | } |
@@ -2164,7 +2165,6 @@ static int xs_tcp_finish_connecting(struct rpc_xprt *xprt, struct socket *sock) | |||
2164 | case 0: | 2165 | case 0: |
2165 | case -EINPROGRESS: | 2166 | case -EINPROGRESS: |
2166 | /* SYN_SENT! */ | 2167 | /* SYN_SENT! */ |
2167 | xprt->connect_cookie++; | ||
2168 | if (xprt->reestablish_timeout < XS_TCP_INIT_REEST_TO) | 2168 | if (xprt->reestablish_timeout < XS_TCP_INIT_REEST_TO) |
2169 | xprt->reestablish_timeout = XS_TCP_INIT_REEST_TO; | 2169 | xprt->reestablish_timeout = XS_TCP_INIT_REEST_TO; |
2170 | } | 2170 | } |