Re: [PATCH v21 01/30] splice: Fix filemap of a blockdev
From: Christian Brauner
Date: Sat May 20 2023 - 05:14:34 EST
On Sat, May 20, 2023 at 01:00:20AM +0100, David Howells wrote:
> Fix filemap_splice_read() to use file->f_mapping->host, not file->f_inode,
> as the source of the file size because in the case of a block device,
> file->f_inode points to the block-special file (which is typically 0
> length) and not the backing store.
>
> Fixes: 07073eb01c5f ("splice: Add a func to do a splice from a buffered file without ITER_PIPE")
> Signed-off-by: David Howells <dhowells@xxxxxxxxxx>
> Reviewed-by: Christoph Hellwig <hch@xxxxxx>
> cc: Steve French <stfrench@xxxxxxxxxxxxx>
> cc: Jens Axboe <axboe@xxxxxxxxx>
> cc: Al Viro <viro@xxxxxxxxxxxxxxxxxx>
> cc: David Hildenbrand <david@xxxxxxxxxx>
> cc: John Hubbard <jhubbard@xxxxxxxxxx>
> cc: linux-mm@xxxxxxxxx
> cc: linux-block@xxxxxxxxxxxxxxx
> cc: linux-fsdevel@xxxxxxxxxxxxxxx
> ---
Reviewed-by: Christian Brauner <brauner@xxxxxxxxxx>