aboutsummaryrefslogtreecommitdiffstats
path: root/mm/filemap.c
diff options
context:
space:
mode:
authorMatthew Wilcox (Oracle) <willy@infradead.org>2022-04-29 17:00:05 -0400
committerMatthew Wilcox (Oracle) <willy@infradead.org>2022-05-09 23:12:30 -0400
commitfa29000b6b2603ec2bfdc4c73249fcb00cd54f85 (patch)
tree8746e20bb5db7e12c4386098a0b3591c43160575 /mm/filemap.c
parentmm/filemap: Hoist filler_t decision to the top of do_read_cache_folio() (diff)
downloadlinux-dev-fa29000b6b2603ec2bfdc4c73249fcb00cd54f85.tar.xz
linux-dev-fa29000b6b2603ec2bfdc4c73249fcb00cd54f85.zip
fs: Add aops->release_folio
This replaces aops->releasepage. Update the documentation, and call it if it exists. Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org> Reviewed-by: Jeff Layton <jlayton@kernel.org>
Diffstat (limited to 'mm/filemap.c')
-rw-r--r--mm/filemap.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/mm/filemap.c b/mm/filemap.c
index 9b7fa47feb5e..78e4a7dc3a56 100644
--- a/mm/filemap.c
+++ b/mm/filemap.c
@@ -3955,6 +3955,8 @@ bool filemap_release_folio(struct folio *folio, gfp_t gfp)
if (folio_test_writeback(folio))
return false;
+ if (mapping && mapping->a_ops->release_folio)
+ return mapping->a_ops->release_folio(folio, gfp);
if (mapping && mapping->a_ops->releasepage)
return mapping->a_ops->releasepage(&folio->page, gfp);
return try_to_free_buffers(&folio->page);