Re: [PATCH] mm: split out memory-failure declarations from internal.h

From: Miaohe Lin

Date: Wed Nov 04 2026 - 21:40:43 EST


On 2026/11/5 0:45, 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. Thanks for your patch.

Acked-by: Miaohe Lin <linmiaohe@xxxxxxxxxx>

Thanks.
.