splice: fix sendfile() issue with relay

Splice isn't always incrementing the ppos correctly, which broke
relay splice.

Signed-off-by: Tom Zanussi <[email protected]>
Tested-by: Dan Williams <[email protected]>
Signed-off-by: Jens Axboe <[email protected]>
This commit is contained in:
Tom Zanussi 2008-05-09 13:28:36 +02:00 • committed by Jens Axboe
commit a82c53a0e3
2 changed files with 9 additions and 5 deletions

View file

@ -1191,7 +1191,7 @@ static ssize_t relay_file_splice_read(struct file *in,
ret = 0;
spliced = 0;
while (len) {
while (len && !spliced) {
ret = subbuf_splice_actor(in, ppos, pipe, len, flags, &nonpad_ret);
if (ret < 0)
break;