diff options
author | David S. Miller <davem@davemloft.net> | 2009-01-05 03:59:00 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-01-05 03:59:00 -0500 |
commit | 7945cc6464a4db0caf6dfacdfe05806051c4cb7b (patch) | |
tree | 8bcd5f9cb276229f1b25844249a4243b6f95f656 /net/ipv4/tcp.c | |
parent | 4f7d54f59bc470f0aaa932f747a95232d7ebf8b1 (diff) |
tcp: Kill extraneous SPLICE_F_NONBLOCK checks.
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>
Diffstat (limited to 'net/ipv4/tcp.c')
-rw-r--r-- | net/ipv4/tcp.c | 4 |
1 files changed, 0 insertions, 4 deletions
diff --git a/net/ipv4/tcp.c b/net/ipv4/tcp.c index bce1b068f2a7..35bcddf8a932 100644 --- a/net/ipv4/tcp.c +++ b/net/ipv4/tcp.c | |||
@@ -597,10 +597,6 @@ ssize_t tcp_splice_read(struct socket *sock, loff_t *ppos, | |||
597 | ret = -ENOTCONN; | 597 | ret = -ENOTCONN; |
598 | break; | 598 | break; |
599 | } | 599 | } |
600 | if (flags & SPLICE_F_NONBLOCK) { | ||
601 | ret = -EAGAIN; | ||
602 | break; | ||
603 | } | ||
604 | if (!timeo) { | 600 | if (!timeo) { |
605 | ret = -EAGAIN; | 601 | ret = -EAGAIN; |
606 | break; | 602 | break; |