diff --git a/include/net/tcp.h b/include/net/tcp.h index 0c61bf0a06da..3b522259da7d 100644 --- a/include/net/tcp.h +++ b/include/net/tcp.h @@ -1368,7 +1368,7 @@ static inline int tcp_win_from_space(const struct sock *sk, int space) /* Note: caller must be prepared to deal with negative returns */ static inline int tcp_space(const struct sock *sk) { - return tcp_win_from_space(sk, sk->sk_rcvbuf - + return tcp_win_from_space(sk, sk->sk_rcvbuf - sk->sk_backlog.len - atomic_read(&sk->sk_rmem_alloc)); }