Re: [RFC PATCH 2/4] iov_iter: Add a function to extract a page list from an iterator
From: Christoph Hellwig
Date: Tue Nov 22 2022 - 07:51:37 EST
On Thu, Nov 17, 2022 at 02:54:54PM +0000, David Howells wrote:
> An additional function, iov_iter_extract_mode() is also provided so that the
> mode of retention that will be employed for an iterator can be queried - and
> therefore how the caller should dispose of the pages later.
Any reason to not just add an out paramter to the main function and
return this directly instead of an extra helper?
> +EXPORT_SYMBOL(iov_iter_extract_pages);
get_user_pages_fast, pin_user_pages_fast are very intentionally
EXPORT_SYMBOL_GPL, which should not be bypassed by an iov_* wrapper.