[Devel] [PATCH] net: Remove unnecessary changes from tcp_v{4, 6}_do_rcv()

Kirill Tkhai ktkhai at virtuozzo.com
Thu Nov 9 14:02:04 MSK 2017


"Initial patch" changes these places without any goal,
without any behavior. Remove the changes.

Please, merge this to "Initial patch" on rebase.

Signed-off-by: Kirill Tkhai <ktkhai at virtuozzo.com>
---
 net/ipv4/tcp_ipv4.c |    8 +++-----
 net/ipv6/tcp_ipv6.c |    8 +++-----
 2 files changed, 6 insertions(+), 10 deletions(-)

diff --git a/net/ipv4/tcp_ipv4.c b/net/ipv4/tcp_ipv4.c
index c55c1b92ac5..fa4a8b73609 100644
--- a/net/ipv4/tcp_ipv4.c
+++ b/net/ipv4/tcp_ipv4.c
@@ -1472,7 +1472,7 @@ int tcp_v4_do_rcv(struct sock *sk, struct sk_buff *skb)
 			}
 		}
 		tcp_rcv_established(sk, skb, tcp_hdr(skb), skb->len);
-		goto restore_context;
+		return 0;
 	}
 
 	if (skb->len < tcp_hdrlen(skb) || tcp_checksum_complete(skb))
@@ -1489,7 +1489,7 @@ int tcp_v4_do_rcv(struct sock *sk, struct sk_buff *skb)
 				rsk = nsk;
 				goto reset;
 			}
-			goto restore_context;
+			return 0;
 		}
 	} else
 		sock_rps_save_rxhash(sk, skb);
@@ -1498,8 +1498,6 @@ int tcp_v4_do_rcv(struct sock *sk, struct sk_buff *skb)
 		rsk = sk;
 		goto reset;
 	}
-
-restore_context:
 	return 0;
 
 reset:
@@ -1511,7 +1509,7 @@ int tcp_v4_do_rcv(struct sock *sk, struct sk_buff *skb)
 	 * might be destroyed here. This current version compiles correctly,
 	 * but you have been warned.
 	 */
-	goto restore_context;
+	return 0;
 
 csum_err:
 	TCP_INC_STATS_BH(sock_net(sk), TCP_MIB_CSUMERRORS);
diff --git a/net/ipv6/tcp_ipv6.c b/net/ipv6/tcp_ipv6.c
index 3497173194b..68b7abfaab1 100644
--- a/net/ipv6/tcp_ipv6.c
+++ b/net/ipv6/tcp_ipv6.c
@@ -1329,7 +1329,7 @@ static int tcp_v6_do_rcv(struct sock *sk, struct sk_buff *skb)
 				goto reset;
 			if (opt_skb)
 				__kfree_skb(opt_skb);
-			goto restore_context;
+			return 0;
 		}
 	} else
 		sock_rps_save_rxhash(sk, skb);
@@ -1338,8 +1338,6 @@ static int tcp_v6_do_rcv(struct sock *sk, struct sk_buff *skb)
 		goto reset;
 	if (opt_skb)
 		goto ipv6_pktoptions;
-
-restore_context:
 	return 0;
 
 reset:
@@ -1348,7 +1346,7 @@ static int tcp_v6_do_rcv(struct sock *sk, struct sk_buff *skb)
 	if (opt_skb)
 		__kfree_skb(opt_skb);
 	kfree_skb(skb);
-	goto restore_context;
+	return 0;
 csum_err:
 	TCP_INC_STATS_BH(sock_net(sk), TCP_MIB_CSUMERRORS);
 	TCP_INC_STATS_BH(sock_net(sk), TCP_MIB_INERRS);
@@ -1382,7 +1380,7 @@ static int tcp_v6_do_rcv(struct sock *sk, struct sk_buff *skb)
 	}
 
 	kfree_skb(opt_skb);
-	goto restore_context;
+	return 0;
 }
 
 static int tcp_v6_rcv(struct sk_buff *skb)



More information about the Devel mailing list