aboutsummaryrefslogtreecommitdiffstats
path: root/mm/folio-compat.c
diff options
context:
space:
mode:
authorMatthew Wilcox (Oracle) <willy@infradead.org>2022-09-02 20:46:01 +0100
committerAndrew Morton <akpm@linux-foundation.org>2022-10-03 14:02:45 -0700
commit681ecf6301786cb06942b57f0ef7103b07ae6813 (patch)
tree6b71119ff4c43fcf44ca4b42eecb98980bdd1d92 /mm/folio-compat.c
parentd788f5b374c2ba204fed57e39acf2452acc24812 (diff)
downloadlinux-681ecf6301786cb06942b57f0ef7103b07ae6813.tar.gz
mm: add folio_add_lru_vma()
Convert lru_cache_add_inactive_or_unevictable() to folio_add_lru_vma() and add a compatibility wrapper. Link: https://lkml.kernel.org/r/20220902194653.1739778-6-willy@infradead.org Signed-off-by: "Matthew Wilcox (Oracle)" <willy@infradead.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Diffstat (limited to 'mm/folio-compat.c')
-rw-r--r--mm/folio-compat.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/mm/folio-compat.c b/mm/folio-compat.c
index 458618c7302c3..e1e23b4947d73 100644
--- a/mm/folio-compat.c
+++ b/mm/folio-compat.c
@@ -88,6 +88,12 @@ void lru_cache_add(struct page *page)
}
EXPORT_SYMBOL(lru_cache_add);
+void lru_cache_add_inactive_or_unevictable(struct page *page,
+ struct vm_area_struct *vma)
+{
+ folio_add_lru_vma(page_folio(page), vma);
+}
+
int add_to_page_cache_lru(struct page *page, struct address_space *mapping,
pgoff_t index, gfp_t gfp)
{