Thread (11 messages) flat view 11 messages, 2 authors, 16d ago
COLD16d

Revision v1 of 2 in this series.

Revisions (2)
  1. v1 current
  2. v2 [diff vs current]

[PATCH 8/8] mm/swap: remove page_swap_entry()

From: Tal Zussman <hidden>
Date: 2026-08-30 10:34:18
Also in: linux-mm, lkml
Subsystem: memory management - swap, the rest · Maintainers: Andrew Morton, Chris Li, Kairui Song, Linus Torvalds

All callers have been converted to folio_swap_entry() and
folio_page_swap_entry(), so remove it.

Signed-off-by: Tal Zussman <redacted>
---
 include/linux/swap.h | 9 ---------
 1 file changed, 9 deletions(-)
diff --git a/include/linux/swap.h b/include/linux/swap.h
index 48632aacbc2a..2fa436958fdb 100644
--- a/include/linux/swap.h
+++ b/include/linux/swap.h
@@ -311,15 +311,6 @@ static inline swp_entry_t folio_page_swap_entry(const struct folio *folio,
 	return folio_swap_entry(folio, folio_page_idx(folio, page));
 }
 
-static inline swp_entry_t page_swap_entry(struct page *page)
-{
-	struct folio *folio = page_folio(page);
-	swp_entry_t entry = folio->swap;
-
-	entry.val += folio_page_idx(folio, page);
-	return entry;
-}
-
 /* linux/mm/page_alloc.c */
 extern unsigned long totalreserve_pages;
 
-- 
2.39.5

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help