[PATCH 0/3] mm: yet more cleanups for page_alloc APIs

From: Brendan Jackman

Date: Thu Jul 16 2026 - 10:45:04 EST


Based on mm-new.

Align some APIs with recent cleanups [0][1], and hide more mm-internal APIs
from public headers.

Part of this was also proposed by Vlastimil right as I was writing it:
https://lore.kernel.org/all/ed4572f4-0074-45c5-993d-7b6533eddc31@xxxxxxxxxx/

And just like with my other recent patches, this has the ulterior motive
of enabling later incoming patches to add alloc_flags arguments to these
internal functions. (But, I do think these are justified as cleanups in
their own right).

[0]: https://lore.kernel.org/all/20260715-spin-trylock-followup-v3-0-fc4d246f705d@xxxxxxxxxx/
[1]: https://lore.kernel.org/all/20260703-alloc-trylock-v5-0-c87b714e19d3@xxxxxxxxxx/

Signed-off-by: Brendan Jackman <jackmanb@xxxxxxxxxx>
---
Brendan Jackman (3):
mm: move internal mempolicy APIs to new internal header
mm, treewide: replace __folio_alloc_node() with folio_alloc_node()
mm: move __folio_alloc() to page_alloc.h

MAINTAINERS | 1 +
drivers/iommu/iommu-pages.c | 9 +--------
drivers/irqchip/irq-loongarch-ir.c | 4 ++--
include/linux/gfp.h | 25 +++----------------------
mm/filemap.c | 4 +++-
mm/mempolicy.c | 1 +
mm/mempolicy.h | 31 +++++++++++++++++++++++++++++++
mm/migrate.c | 2 +-
mm/page_alloc.c | 18 +++++++++++++++---
mm/page_alloc.h | 4 ++++
mm/shmem.c | 1 +
mm/swap_state.c | 1 +
net/sunrpc/svc.c | 2 +-
13 files changed, 65 insertions(+), 38 deletions(-)
---
base-commit: 512c82e906fe2c26023e307c7951d53e90910b57
change-id: 20260716-folio-alloc-cleanups-0fe319b881c2

Best regards,
--
Brendan Jackman <jackmanb@xxxxxxxxxx>