]> git.baikalelectronics.ru Git - kernel.git/commit
splice: __generic_file_splice_read: fix i_size_read() length checks
authorHugh Dickins <hugh@veritas.com>
Thu, 7 Jun 2007 07:36:00 +0000 (09:36 +0200)
committerJens Axboe <jens.axboe@oracle.com>
Fri, 8 Jun 2007 06:34:05 +0000 (08:34 +0200)
commit94d6e2e1ad99b0bf4326a03b7f5257fa105fb8c6
treecd2043c6c951c440988be8057380dfaab1ceb481
parent49df9eda11cd870ec2a01892baea1da2ecf8cc7f
splice: __generic_file_splice_read: fix i_size_read() length checks

__generic_file_splice_read's partial page check, at eof after readpage,
not only got its calculations wrong, but also reused the loff variable:
causing data corruption when splicing from a non-0 offset in the file's
last page (revealed by ext2 -b 1024 testing on a loop of a tmpfs file).

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