diff options
Diffstat (limited to 'net/ipv4/tcp.c')
-rw-r--r-- | net/ipv4/tcp.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/net/ipv4/tcp.c b/net/ipv4/tcp.c index 4d655e945413..bce1b068f2a7 100644 --- a/net/ipv4/tcp.c +++ b/net/ipv4/tcp.c | |||
@@ -580,10 +580,6 @@ ssize_t tcp_splice_read(struct socket *sock, loff_t *ppos, | |||
580 | else if (!ret) { | 580 | else if (!ret) { |
581 | if (spliced) | 581 | if (spliced) |
582 | break; | 582 | break; |
583 | if (flags & SPLICE_F_NONBLOCK) { | ||
584 | ret = -EAGAIN; | ||
585 | break; | ||
586 | } | ||
587 | if (sock_flag(sk, SOCK_DONE)) | 583 | if (sock_flag(sk, SOCK_DONE)) |
588 | break; | 584 | break; |
589 | if (sk->sk_err) { | 585 | if (sk->sk_err) { |
@@ -601,6 +597,10 @@ ssize_t tcp_splice_read(struct socket *sock, loff_t *ppos, | |||
601 | ret = -ENOTCONN; | 597 | ret = -ENOTCONN; |
602 | break; | 598 | break; |
603 | } | 599 | } |
600 | if (flags & SPLICE_F_NONBLOCK) { | ||
601 | ret = -EAGAIN; | ||
602 | break; | ||
603 | } | ||
604 | if (!timeo) { | 604 | if (!timeo) { |
605 | ret = -EAGAIN; | 605 | ret = -EAGAIN; |
606 | break; | 606 | break; |