summaryrefslogtreecommitdiff
path: root/mm/folio-compat.c
diff options
context:
space:
mode:
authorMatthew Wilcox (Oracle) <willy@infradead.org>2021-04-29 11:09:31 -0400
committerMatthew Wilcox (Oracle) <willy@infradead.org>2021-10-18 07:49:40 -0400
commit0d31125d2d3267ec349796418a16761bbda20387 (patch)
tree0c8d48387f014681277dde1285d675fa675951c9 /mm/folio-compat.c
parent934387c99f1ce3c21b4f1fa67005dd95fbcee5e9 (diff)
mm/lru: Add folio_add_lru()
Reimplement lru_cache_add() as a wrapper around folio_add_lru(). Saves 159 bytes of kernel text due to removing calls to compound_head(). Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org> Reviewed-by: Christoph Hellwig <hch@lst.de> Reviewed-by: David Howells <dhowells@redhat.com> Acked-by: Vlastimil Babka <vbabka@suse.cz>
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 c1e01bc36d32..6de3cd78a4ae 100644
--- a/mm/folio-compat.c
+++ b/mm/folio-compat.c
@@ -102,3 +102,9 @@ bool redirty_page_for_writepage(struct writeback_control *wbc,
return folio_redirty_for_writepage(wbc, page_folio(page));
}
EXPORT_SYMBOL(redirty_page_for_writepage);
+
+void lru_cache_add(struct page *page)
+{
+ folio_add_lru(page_folio(page));
+}
+EXPORT_SYMBOL(lru_cache_add);