Re: [PATCH v2 26/28] gup: Convert compound_range_next() to gup_folio_range_next()

From: Christoph Hellwig
Date: Mon Jan 10 2022 - 03:43:16 EST


On Mon, Jan 10, 2022 at 04:24:04AM +0000, Matthew Wilcox (Oracle) wrote:
> +static inline struct folio *gup_folio_range_next(unsigned long i,
> unsigned long npages, struct page *start, unsigned int *ntails)
> {
> - struct page *next, *page;
> + struct page *next;
> + struct folio *folio;
> unsigned int nr = 1;
>
> next = nth_page(start, i);
> + folio = page_folio(next);

Superficial nit: initialization next and folio at declaration time
would reada little better.

Otherwise looks good:

Reviewed-by: Christoph Hellwig <hch@xxxxxx>