From: Trond Myklebust Date: Thu, 26 Sep 2013 14:18:04 +0000 (-0400) Subject: SUNRPC: Only update the TCP connect cookie on a successful connect X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=8b71798c0d389d4cadc884fc7d68c61ee8cd4f45;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git SUNRPC: Only update the TCP connect cookie on a successful connect Signed-off-by: Trond Myklebust --- 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) transport->tcp_copied = 0; transport->tcp_flags = TCP_RCV_COPY_FRAGHDR | TCP_RCV_COPY_XID; + xprt->connect_cookie++; xprt_wake_pending_tasks(xprt, -EAGAIN); } @@ -2164,7 +2165,6 @@ static int xs_tcp_finish_connecting(struct rpc_xprt *xprt, struct socket *sock) case 0: case -EINPROGRESS: /* SYN_SENT! */ - xprt->connect_cookie++; if (xprt->reestablish_timeout < XS_TCP_INIT_REEST_TO) xprt->reestablish_timeout = XS_TCP_INIT_REEST_TO; }