Skip to content

Commit

Permalink
mm: remove free_unref_page_list()
Browse files Browse the repository at this point in the history
All callers now use free_unref_folios() so we can delete this function.

Link: https://lkml.kernel.org/r/20240227174254.710559-15-willy@infradead.org
Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Reviewed-by: Ryan Roberts <ryan.roberts@arm.com>
Cc: David Hildenbrand <david@redhat.com>
Cc: Mel Gorman <mgorman@suse.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
  • Loading branch information
Matthew Wilcox (Oracle) authored and akpm00 committed Mar 5, 2024
1 parent be5a9e1 commit 8b7b0a5
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 19 deletions.
1 change: 0 additions & 1 deletion mm/internal.h
Original file line number Diff line number Diff line change
Expand Up @@ -453,7 +453,6 @@ extern int user_min_free_kbytes;

void free_unref_page(struct page *page, unsigned int order);
void free_unref_folios(struct folio_batch *fbatch);
void free_unref_page_list(struct list_head *list);

extern void zone_pcp_reset(struct zone *zone);
extern void zone_pcp_disable(struct zone *zone);
Expand Down
18 changes: 0 additions & 18 deletions mm/page_alloc.c
Original file line number Diff line number Diff line change
Expand Up @@ -2605,24 +2605,6 @@ void free_unref_folios(struct folio_batch *folios)
folio_batch_reinit(folios);
}

void free_unref_page_list(struct list_head *list)
{
struct folio_batch fbatch;

folio_batch_init(&fbatch);
while (!list_empty(list)) {
struct folio *folio = list_first_entry(list, struct folio, lru);

list_del(&folio->lru);
if (folio_batch_add(&fbatch, folio) > 0)
continue;
free_unref_folios(&fbatch);
}

if (fbatch.nr)
free_unref_folios(&fbatch);
}

/*
* split_page takes a non-compound higher-order page, and splits it into
* n (1<<order) sub-pages: page[0..n]
Expand Down

0 comments on commit 8b7b0a5

Please sign in to comment.