diff --git a/include/net/tcp.h b/include/net/tcp.h index abcf53a6db04..3f4223a550d9 100644 --- a/include/net/tcp.h +++ b/include/net/tcp.h @@ -1353,7 +1353,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)); }