tcp: constify tcp_openreq_init_rwin()

Soon, listener socket wont be locked when tcp_openreq_init_rwin()
is called. We need to read socket fields once, as their value
could change under us.

Signed-off-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
Eric Dumazet
2015-09-25 13:00:36 -07:00
committed by David S. Miller
parent b40cf18ef7
commit b1964b5fce
2 changed files with 20 additions and 11 deletions
+2 -1
View File
@@ -1207,7 +1207,8 @@ static inline int tcp_full_space(const struct sock *sk)
}
extern void tcp_openreq_init_rwin(struct request_sock *req,
struct sock *sk, struct dst_entry *dst);
const struct sock *sk_listener,
const struct dst_entry *dst);
void tcp_enter_memory_pressure(struct sock *sk);