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>
This commit is contained in:
parent
4f7d54f59b
commit
7945cc6464
|
@ -597,10 +597,6 @@ ssize_t tcp_splice_read(struct socket *sock, loff_t *ppos,
|
||||||
ret = -ENOTCONN;
|
ret = -ENOTCONN;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if (flags & SPLICE_F_NONBLOCK) {
|
|
||||||
ret = -EAGAIN;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
if (!timeo) {
|
if (!timeo) {
|
||||||
ret = -EAGAIN;
|
ret = -EAGAIN;
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Reference in a new issue