summaryrefslogtreecommitdiff
path: root/mm/folio-compat.c
diff options
context:
space:
mode:
authorMatthew Wilcox (Oracle) <willy@infradead.org>2021-07-28 15:14:48 -0400
committerMatthew Wilcox (Oracle) <willy@infradead.org>2022-01-04 13:15:34 -0500
commit82c50f8b443359ec99348cd9b1289f55cd47779d (patch)
treea583dd7356daabd92a4b4003407dd0ecc1a9a32f /mm/folio-compat.c
parent960ea971fa6cdac8d4825a6aaf99b92882e79fbb (diff)
downloadlwn-82c50f8b443359ec99348cd9b1289f55cd47779d.tar.gz
lwn-82c50f8b443359ec99348cd9b1289f55cd47779d.zip
filemap: Add filemap_release_folio()
Reimplement try_to_release_page() as a wrapper around filemap_release_folio(). Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org> Reviewed-by: Christoph Hellwig <hch@lst.de> Reviewed-by: William Kucharski <william.kucharski@oracle.com>
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 749a695b4217..749555a232a8 100644
--- a/mm/folio-compat.c
+++ b/mm/folio-compat.c
@@ -145,3 +145,9 @@ void delete_from_page_cache(struct page *page)
{
return filemap_remove_folio(page_folio(page));
}
+
+int try_to_release_page(struct page *page, gfp_t gfp)
+{
+ return filemap_release_folio(page_folio(page), gfp);
+}
+EXPORT_SYMBOL(try_to_release_page);