tcp: minor optimization in tcp_add_backlog()
authorEric Dumazet <edumazet@google.com>
Mon, 15 Nov 2021 19:02:30 +0000 (11:02 -0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 3 Nov 2022 14:57:52 +0000 (23:57 +0900)
commit49713d7c38588311815889cb8c766591255ec836
tree83fec5091bd1da8aa4f1b46638bbed31a4fc5352
parentaab883bd60bcd682b1ccd0bf94989fbabf2f9ad5
tcp: minor optimization in tcp_add_backlog()

[ Upstream commit d519f350967a60b85a574ad8aeac43f2b4384746 ]

If packet is going to be coalesced, sk_sndbuf/sk_rcvbuf values
are not used. Defer their access to the point we need them.

Signed-off-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Stable-dep-of: ec791d8149ff ("tcp: fix a signed-integer-overflow bug in tcp_add_backlog()")
Signed-off-by: Sasha Levin <sashal@kernel.org>
net/ipv4/tcp_ipv4.c