tcp: Kill extraneous SPLICE_F_NONBLOCK checks.
authorDavid S. Miller <davem@davemloft.net>
Mon, 5 Jan 2009 08:59:00 +0000 (00:59 -0800)
committerDavid S. Miller <davem@davemloft.net>
Mon, 5 Jan 2009 08:59:00 +0000 (00:59 -0800)
In splice TCP receive, the SPLICE_F_NONBLOCK flag is used
to compute the "timeo" value.  So checking it again inside
of the main receive loop to trigger -EAGAIN processing is
entirely unnecessary.

Noticed by Jarek P. and Lennert Buytenhek.

Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv4/tcp.c

index bce1b068f2a725bb97e06c7ad1839bab8f0e5b66..35bcddf8a932ea7a3b377b0b2b2592d3f33a17c0 100644 (file)
@@ -597,10 +597,6 @@ ssize_t tcp_splice_read(struct socket *sock, loff_t *ppos,
                                        ret = -ENOTCONN;
                                break;
                        }
-                       if (flags & SPLICE_F_NONBLOCK) {
-                               ret = -EAGAIN;
-                               break;
-                       }
                        if (!timeo) {
                                ret = -EAGAIN;
                                break;