]> git.baikalelectronics.ru Git - kernel.git/commit
splice: fix infinite loop in generic_file_splice_read()
authorJens Axboe <jens.axboe@oracle.com>
Thu, 10 Apr 2008 06:24:25 +0000 (08:24 +0200)
committerJens Axboe <jens.axboe@oracle.com>
Thu, 10 Apr 2008 06:24:25 +0000 (08:24 +0200)
commit75d1cf8e4eb1e4fdba315e5aea109d041fdae84d
tree7a2c76742945e9659db502c16ed17d33a0644bfd
parentd4395f845f31582ed2b8ee9863ff7564ef286a68
splice: fix infinite loop in generic_file_splice_read()

There's a quirky loop in generic_file_splice_read() that could go
on indefinitely, if the file splice returns 0 permanently (and not
just as a temporary condition). Get rid of the loop and pass
back -EAGAIN correctly from __generic_file_splice_read(), so we
handle that condition properly as well.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
fs/splice.c