summaryrefslogtreecommitdiffstats
path: root/mm/internal.h
diff options
context:
space:
mode:
authorMike Rapoport (IBM) <rppt@kernel.org>2023-03-26 19:02:15 +0300
committerAndrew Morton <akpm@linux-foundation.org>2023-04-18 16:29:47 -0700
commit62f31bd4dcedffe3c919deb76ed65bf62c3cf80b (patch)
treee409ca731c503eab11448c664a742853a3adc37f /mm/internal.h
parente961cc5652c68610d8acb65f20267b8c55444e5b (diff)
downloadlinux-62f31bd4dcedffe3c919deb76ed65bf62c3cf80b.tar.gz
linux-62f31bd4dcedffe3c919deb76ed65bf62c3cf80b.tar.bz2
linux-62f31bd4dcedffe3c919deb76ed65bf62c3cf80b.zip
mm: move free_area_empty() to mm/internal.h
The free_area_empty() helper is only used inside mm/ so move it there to reduce noise in include/linux/mmzone.h Link: https://lkml.kernel.org/r/20230326160215.2674531-1-rppt@kernel.org Signed-off-by: Mike Rapoport (IBM) <rppt@kernel.org> Suggested-by: Matthew Wilcox (Oracle) <willy@infradead.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Diffstat (limited to 'mm/internal.h')
-rw-r--r--mm/internal.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/mm/internal.h b/mm/internal.h
index 73b167b59cc5..92ddd3a05b74 100644
--- a/mm/internal.h
+++ b/mm/internal.h
@@ -517,6 +517,11 @@ void init_cma_reserved_pageblock(struct page *page);
int find_suitable_fallback(struct free_area *area, unsigned int order,
int migratetype, bool only_stealable, bool *can_steal);
+static inline bool free_area_empty(struct free_area *area, int migratetype)
+{
+ return list_empty(&area->free_list[migratetype]);
+}
+
/*
* These three helpers classifies VMAs for virtual memory accounting.
*/