]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
mm: delete the unused put_pages_list()
authorHugh Dickins <hughd@google.com>
Sun, 27 Oct 2024 20:14:42 +0000 (13:14 -0700)
committerAndrew Morton <akpm@linux-foundation.org>
Fri, 1 Nov 2024 04:29:33 +0000 (21:29 -0700)
The last user of put_pages_list() converted away from it in 6.10 commit
06c375053cef ("iommu/vt-d: add wrapper functions for page allocations"):
delete put_pages_list().

Link: https://lkml.kernel.org/r/d9985d6a-293e-176b-e63d-82fdfd28c139@google.com
Signed-off-by: Hugh Dickins <hughd@google.com>
Acked-by: Peter Xu <peterx@redhat.com>
Acked-by: David Hildenbrand <david@redhat.com>
Reviewed-by: Yang Shi <shy828301@gmail.com>
Cc: Matthew Wilcox (Oracle) <willy@infradead.org>
Cc: Pasha Tatashin <pasha.tatashin@soleen.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
include/linux/mm.h
mm/swap.c

index 086ba524d3ba8ad1b69d9c3e4dd412e08c829365..610653a8b0fefac768e7671a1098fbce26e2ec90 100644 (file)
@@ -1286,8 +1286,6 @@ static inline struct folio *virt_to_folio(const void *x)
 
 void __folio_put(struct folio *folio);
 
-void put_pages_list(struct list_head *pages);
-
 void split_page(struct page *page, unsigned int order);
 void folio_copy(struct folio *dst, struct folio *src);
 int folio_mc_copy(struct folio *dst, struct folio *src);
index b8e3259ea2c472e07b9c154e395a9e4a65213de0..638a3f001676f0c75c365d8a53334c0699ee2cf9 100644 (file)
--- a/mm/swap.c
+++ b/mm/swap.c
@@ -127,37 +127,6 @@ void __folio_put(struct folio *folio)
 }
 EXPORT_SYMBOL(__folio_put);
 
-/**
- * put_pages_list() - release a list of pages
- * @pages: list of pages threaded on page->lru
- *
- * Release a list of pages which are strung together on page.lru.
- */
-void put_pages_list(struct list_head *pages)
-{
-       struct folio_batch fbatch;
-       struct folio *folio, *next;
-
-       folio_batch_init(&fbatch);
-       list_for_each_entry_safe(folio, next, pages, lru) {
-               if (!folio_put_testzero(folio))
-                       continue;
-               if (folio_test_hugetlb(folio)) {
-                       free_huge_folio(folio);
-                       continue;
-               }
-               /* LRU flag must be clear because it's passed using the lru */
-               if (folio_batch_add(&fbatch, folio) > 0)
-                       continue;
-               free_unref_folios(&fbatch);
-       }
-
-       if (fbatch.nr)
-               free_unref_folios(&fbatch);
-       INIT_LIST_HEAD(pages);
-}
-EXPORT_SYMBOL(put_pages_list);
-
 typedef void (*move_fn_t)(struct lruvec *lruvec, struct folio *folio);
 
 static void lru_add(struct lruvec *lruvec, struct folio *folio)