diff options
author | Matthew Wilcox (Oracle) <willy@infradead.org> | 2022-04-29 17:00:05 -0400 |
---|---|---|
committer | Matthew Wilcox (Oracle) <willy@infradead.org> | 2022-05-09 23:12:30 -0400 |
commit | fa29000b6b2603ec2bfdc4c73249fcb00cd54f85 (patch) | |
tree | 8746e20bb5db7e12c4386098a0b3591c43160575 /mm/filemap.c | |
parent | 07950008692bf22074020e927e95655cd48fdcda (diff) |
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.c | 2 |
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); |