Re: [PATCH] mm: split out memory-failure declarations from internal.h
From: Jose A. Perez de Azpillaga
Date: Wed Nov 04 2026 - 18:35:50 EST
On 11/4/26 5:45 PM, Breno Leitao wrote:
> mm/internal.h carries the memory failure declarations, but only seven
> of the 81 .c files that include it use them.
>
> Move memory failure declarations to a new mm/memory-failure.h and
> include that from those seven files that need them.
>
> Move the block as is, including take_page_off_buddy(),
> put_page_back_buddy() and page_mapped_in_vma(): they live in
> page_alloc.c and page_vma_mapped.c, but are built only for
> CONFIG_MEMORY_FAILURE and called only from memory-failure.c.
>
> Keep the declarations private to mm/.
>
> No functional change.
>
> Suggested-by: Mike Rapoport <rppt@xxxxxxxxxx>
> Link: https://lore.kernel.org/all/aumt-4kfGGtoXuh-@xxxxxxxxxx/
> Signed-off-by: Breno Leitao <leitao@xxxxxxxxxx>
LGTM:
Reviewed-by: Jose A. Perez de Azpillaga <azpijr@xxxxxxxxx>
--
cheers,
jose a. p-a