net: add sk_stream_is_writeable() helper
Several call sites use the hardcoded following condition : sk_stream_wspace(sk) >= sk_stream_min_wspace(sk) Lets use a helper because TCP_NOTSENT_LOWAT support will change this condition for TCP sockets. Signed-off-by: Eric Dumazet <edumazet@google.com> Cc: Neal Cardwell <ncardwell@google.com> Cc: Yuchung Cheng <ycheng@google.com> Acked-by: Neal Cardwell <ncardwell@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:

committed by
David S. Miller

parent
4d58c02520
commit
64dc61306c
@@ -442,7 +442,7 @@ static void svc_tcp_write_space(struct sock *sk)
|
||||
{
|
||||
struct socket *sock = sk->sk_socket;
|
||||
|
||||
if (sk_stream_wspace(sk) >= sk_stream_min_wspace(sk) && sock)
|
||||
if (sk_stream_is_writeable(sk) && sock)
|
||||
clear_bit(SOCK_NOSPACE, &sock->flags);
|
||||
svc_write_space(sk);
|
||||
}
|
||||
|
Reference in New Issue
Block a user