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: NHugh Dickins <hugh@veritas.com> Signed-off-by: NJens Axboe <jens.axboe@oracle.com>
Showing
想要评论请 注册 或 登录