Re: linux-next: build failure after merge of the akpm-current tree

From: Arnd Bergmann
Date: Wed Feb 03 2021 - 12:11:14 EST


On Tue, Feb 2, 2021 at 10:12 AM Stephen Rothwell <sfr@xxxxxxxxxxxxxxxx> wrote:

>
> 983cb10d3f90 ("mm/gup: do not migrate zero page")
>
> I have applied the following patch for today:
>
> From: Stephen Rothwell <sfr@xxxxxxxxxxxxxxxx>
> Date: Tue, 2 Feb 2021 19:49:00 +1100
> Subject: [PATCH] make is_pinnable_page a macro
>
> As it is currently defined before page_to_section() which it needs.
>
> Signed-off-by: Stephen Rothwell <sfr@xxxxxxxxxxxxxxxx>

I still see the same problem in next-20210203, and your patch below
fixes it for me.
Did you drop it from the latest build?

Arnd

> diff --git a/include/linux/mm.h b/include/linux/mm.h
> index 58f250cabea6..a608feb0d42e 100644
> --- a/include/linux/mm.h
> +++ b/include/linux/mm.h
> @@ -1128,11 +1128,9 @@ static inline bool is_zone_movable_page(const struct page *page)
> }
>
> /* MIGRATE_CMA and ZONE_MOVABLE do not allow pin pages */
> -static inline bool is_pinnable_page(struct page *page)
> -{
> - return !(is_zone_movable_page(page) || is_migrate_cma_page(page)) ||
> - is_zero_pfn(page_to_pfn(page));
> -}
> +#define is_pinnable_page(page) \
> + (!(is_zone_movable_page(page) || is_migrate_cma_page(page)) || \
> + is_zero_pfn(page_to_pfn(page)))
>
> #ifdef CONFIG_DEV_PAGEMAP_OPS
> void free_devmap_managed_page(struct page *page);