Re: [PATCH v12 01/10] vfs, iomap: Fix generic_file_splice_read() to avoid reversion of ITER_PIPE
From: Matthew Wilcox
Date: Wed Feb 08 2023 - 12:22:09 EST
On Wed, Feb 08, 2023 at 04:09:51PM +0000, David Howells wrote:
> @@ -2688,7 +2689,7 @@ ssize_t filemap_read(struct kiocb *iocb, struct iov_iter *iter,
> if (unlikely(iocb->ki_pos >= i_size_read(inode)))
> break;
>
> - error = filemap_get_pages(iocb, iter, &fbatch);
> + error = filemap_get_pages(iocb, iov_iter_count(iter), &fbatch);
What's the point in iov_iter_count() anyway? It's more characters
than iter->count, so why not use it directly?