mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-25 08:02:56 +00:00
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:
parent
4d58c02520
commit
64dc61306c
7 changed files with 12 additions and 8 deletions
|
@ -30,7 +30,7 @@ void sk_stream_write_space(struct sock *sk)
|
|||
struct socket *sock = sk->sk_socket;
|
||||
struct socket_wq *wq;
|
||||
|
||||
if (sk_stream_wspace(sk) >= sk_stream_min_wspace(sk) && sock) {
|
||||
if (sk_stream_is_writeable(sk) && sock) {
|
||||
clear_bit(SOCK_NOSPACE, &sock->flags);
|
||||
|
||||
rcu_read_lock();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue