splice: only return -EAGAIN if there's hope of more data
authorJens Axboe <jens.axboe@oracle.com>
Wed, 20 Feb 2008 09:34:51 +0000 (10:34 +0100)
committerJens Axboe <axboe@carl.home.kernel.dk>
Tue, 4 Mar 2008 10:14:39 +0000 (11:14 +0100)
sys_tee() currently is a bit eager in returning -EAGAIN, it may do so
even if we don't have a chance of anymore data becoming available. So
improve the logic and only return -EAGAIN if we have an attached writer
to the input pipe.

Reported by Johann Felix Soden <johfel@gmx.de> and
Patrick McManus <mcmanus@ducksong.com>.

Tested-by: Johann Felix Soden <johfel@users.sourceforge.net>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>

No differences found