mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-27 21:03:32 +00:00
tcp_metrics: do not create an entry from tcp_init_metrics()
[ Upstream commita135798e6e
] tcp_init_metrics() only wants to get metrics if they were previously stored in the cache. Creating an entry is adding useless costs, especially when tcp_no_metrics_save is set. Fixes:51c5d0c4b1
("tcp: Maintain dynamic metrics in local cache.") Signed-off-by: Eric Dumazet <edumazet@google.com> Reviewed-by: David Ahern <dsahern@kernel.org> Acked-by: Neal Cardwell <ncardwell@google.com> Signed-off-by: Paolo Abeni <pabeni@redhat.com> Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
parent
ce2ef6ec0a
commit
7faa294fa3
1 changed files with 1 additions and 1 deletions
|
@ -478,7 +478,7 @@ void tcp_init_metrics(struct sock *sk)
|
|||
goto reset;
|
||||
|
||||
rcu_read_lock();
|
||||
tm = tcp_get_metrics(sk, dst, true);
|
||||
tm = tcp_get_metrics(sk, dst, false);
|
||||
if (!tm) {
|
||||
rcu_read_unlock();
|
||||
goto reset;
|
||||
|
|
Loading…
Reference in a new issue