The patch titled Subject: mm: move get_page_from_free_area() to mm/page_alloc.c has been added to the -mm mm-unstable branch. Its filename is mm-move-get_page_from_free_area-to-mm-page_allocc.patch This patch will shortly appear at https://git.kernel.org/pub/scm/linux/kernel/git/akpm/25-new.git/tree/patches/mm-move-get_page_from_free_area-to-mm-page_allocc.patch This patch will later appear in the mm-unstable branch at git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm Before you just go and hit "reply", please: a) Consider who else should be cc'ed b) Prefer to cc a suitable mailing list as well c) Ideally: find the original patch on the mailing list and do a reply-to-all to that, adding suitable additional cc's *** Remember to use Documentation/process/submit-checklist.rst when testing your code *** The -mm tree is included into linux-next via the mm-everything branch at git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm and is updated there every 2-3 working days ------------------------------------------------------ From: "Mike Rapoport (IBM)" <rppt@xxxxxxxxxx> Subject: mm: move get_page_from_free_area() to mm/page_alloc.c Date: Sun, 19 Mar 2023 13:42:14 +0200 The get_page_from_free_area() helper is only used in mm/page_alloc.c so move it there to reduce noise in include/linux/mmzone.h Link: https://lkml.kernel.org/r/20230319114214.2133332-1-rppt@xxxxxxxxxx Signed-off-by: Mike Rapoport (IBM) <rppt@xxxxxxxxxx> Reviewed-by: Lorenzo Stoakes <lstoakes@xxxxxxxxx> Acked-by: Kirill A. Shutemov <kirill.shutemov@xxxxxxxxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- --- a/include/linux/mmzone.h~mm-move-get_page_from_free_area-to-mm-page_allocc +++ a/include/linux/mmzone.h @@ -108,13 +108,6 @@ struct free_area { unsigned long nr_free; }; -static inline struct page *get_page_from_free_area(struct free_area *area, - int migratetype) -{ - return list_first_entry_or_null(&area->free_list[migratetype], - struct page, lru); -} - static inline bool free_area_empty(struct free_area *area, int migratetype) { return list_empty(&area->free_list[migratetype]); --- a/mm/page_alloc.c~mm-move-get_page_from_free_area-to-mm-page_allocc +++ a/mm/page_alloc.c @@ -1048,6 +1048,13 @@ static inline void del_page_from_free_li zone->free_area[order].nr_free--; } +static inline struct page *get_page_from_free_area(struct free_area *area, + int migratetype) +{ + return list_first_entry_or_null(&area->free_list[migratetype], + struct page, lru); +} + /* * If this is not the largest possible page, check if the buddy * of the next-highest order is free. If it is, it's possible _ Patches currently in -mm which might be from rppt@xxxxxxxxxx are mm-move-get_page_from_free_area-to-mm-page_allocc.patch