]> git.kernelconcepts.de Git - karo-tx-linux.git/blobdiff - net/ipv4/tcp.c
net: add sk_stream_is_writeable() helper
[karo-tx-linux.git] / net / ipv4 / tcp.c
index 5423223e93c25074f87c92dc60b338fddcb66f3f..5eca9060bb8e28a2ff935dcacbc7ba16daa6f33a 100644 (file)
@@ -499,7 +499,7 @@ unsigned int tcp_poll(struct file *file, struct socket *sock, poll_table *wait)
                        mask |= POLLIN | POLLRDNORM;
 
                if (!(sk->sk_shutdown & SEND_SHUTDOWN)) {
-                       if (sk_stream_wspace(sk) >= sk_stream_min_wspace(sk)) {
+                       if (sk_stream_is_writeable(sk)) {
                                mask |= POLLOUT | POLLWRNORM;
                        } else {  /* send SIGIO later */
                                set_bit(SOCK_ASYNC_NOSPACE,
@@ -510,7 +510,7 @@ unsigned int tcp_poll(struct file *file, struct socket *sock, poll_table *wait)
                                 * wspace test but before the flags are set,
                                 * IO signal will be lost.
                                 */
-                               if (sk_stream_wspace(sk) >= sk_stream_min_wspace(sk))
+                               if (sk_stream_is_writeable(sk))
                                        mask |= POLLOUT | POLLWRNORM;
                        }
                } else