Skip to content

Commit

Permalink
mm: move free_area_empty() to mm/internal.h
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
rppt authored and akpm00 committed Apr 18, 2023
1 parent e961cc5 commit 62f31bd
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
5 changes: 0 additions & 5 deletions include/linux/mmzone.h
Original file line number Diff line number Diff line change
Expand Up @@ -110,11 +110,6 @@ struct free_area {
unsigned long nr_free;
};

static inline bool free_area_empty(struct free_area *area, int migratetype)
{
return list_empty(&area->free_list[migratetype]);
}

struct pglist_data;

#ifdef CONFIG_NUMA
Expand Down
5 changes: 5 additions & 0 deletions mm/internal.h
Original file line number Diff line number Diff line change
Expand Up @@ -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.
*/
Expand Down

0 comments on commit 62f31bd

Please sign in to comment.