]> git.baikalelectronics.ru Git - kernel.git/commit
splice: fix offset mangling with direct splicing (sendfile)
authorJens Axboe <jens.axboe@oracle.com>
Fri, 13 Jul 2007 12:11:43 +0000 (14:11 +0200)
committerJens Axboe <jens.axboe@oracle.com>
Fri, 13 Jul 2007 12:14:31 +0000 (14:14 +0200)
commita0c689582a5718346fa5ed94ed67313d88cad7cd
treeb944b46d3856948931160c8a75ee27be3417c515
parent4af1f14e65c2f5f29b57878e4a6a77af8d5dcc54
splice: fix offset mangling with direct splicing (sendfile)

If the output actor doesn't transfer the full amount of data, we will
increment ppos too much. Two related bugs in there:

- We need to break out and return actor() retval if it is shorted than
  what we spliced into the pipe.

- Adjust ppos only according to actor() return.

Also fix loop problem in generic_file_splice_read(), it should not keep
going when data has already been transferred.

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