Re: [PATCH v5 2/3] mm: introduce put_user_page*(), placeholder versions
From: Jan Kara
Date: Wed Oct 10 2018 - 04:03:30 EST
On Tue 09-10-18 21:11:33, john.hubbard@xxxxxxxxx wrote:
> +/*
> + * put_user_pages() - for each page in the @pages array, release the page
> + * using put_user_page().
> + *
> + * Please see the put_user_page() documentation for details.
> + *
> + * This is just like put_user_pages_dirty(), except that it invokes
> + * set_page_dirty_lock(), instead of set_page_dirty().
This paragraph should be deleted. Other than that the patch looks good.
Honza
> + *
> + * @pages: array of pages to be marked dirty and released.
> + * @npages: number of pages in the @pages array.
> + *
> + */
> +void put_user_pages(struct page **pages, unsigned long npages)
> +{
> + unsigned long index;
> +
> + for (index = 0; index < npages; index++)
> + put_user_page(pages[index]);
> +}
> +EXPORT_SYMBOL(put_user_pages);
> +
> /*
> * get_kernel_pages() - pin kernel pages in memory
> * @kiov: An array of struct kvec structures
> --
> 2.19.1
>
--
Jan Kara <jack@xxxxxxxx>
SUSE Labs, CR