iomap: Remove iomap_invalidatepage()

Use iomap_invalidate_folio() in all the iomap-based filesystems
and rename the iomap_invalidatepage tracepoint.
Signed-off-by: default avatarMatthew Wilcox (Oracle) <willy@infradead.org>
Tested-by: default avatarDamien Le Moal <damien.lemoal@opensource.wdc.com>
Acked-by: default avatarDamien Le Moal <damien.lemoal@opensource.wdc.com>
Tested-by: Mike Marshall <hubcap@omnibond.com> # orangefs
Tested-by: David Howells <dhowells@redhat.com> # afs
parent 128d1f82
...@@ -781,7 +781,7 @@ static const struct address_space_operations gfs2_aops = { ...@@ -781,7 +781,7 @@ static const struct address_space_operations gfs2_aops = {
.readahead = gfs2_readahead, .readahead = gfs2_readahead,
.set_page_dirty = __set_page_dirty_nobuffers, .set_page_dirty = __set_page_dirty_nobuffers,
.releasepage = iomap_releasepage, .releasepage = iomap_releasepage,
.invalidatepage = iomap_invalidatepage, .invalidate_folio = iomap_invalidate_folio,
.bmap = gfs2_bmap, .bmap = gfs2_bmap,
.direct_IO = noop_direct_IO, .direct_IO = noop_direct_IO,
.migratepage = iomap_migrate_page, .migratepage = iomap_migrate_page,
......
...@@ -476,7 +476,7 @@ EXPORT_SYMBOL_GPL(iomap_releasepage); ...@@ -476,7 +476,7 @@ EXPORT_SYMBOL_GPL(iomap_releasepage);
void iomap_invalidate_folio(struct folio *folio, size_t offset, size_t len) void iomap_invalidate_folio(struct folio *folio, size_t offset, size_t len)
{ {
trace_iomap_invalidatepage(folio->mapping->host, trace_iomap_invalidate_folio(folio->mapping->host,
folio_pos(folio) + offset, len); folio_pos(folio) + offset, len);
/* /*
...@@ -496,13 +496,6 @@ void iomap_invalidate_folio(struct folio *folio, size_t offset, size_t len) ...@@ -496,13 +496,6 @@ void iomap_invalidate_folio(struct folio *folio, size_t offset, size_t len)
} }
EXPORT_SYMBOL_GPL(iomap_invalidate_folio); EXPORT_SYMBOL_GPL(iomap_invalidate_folio);
void iomap_invalidatepage(struct page *page, unsigned int offset,
unsigned int len)
{
iomap_invalidate_folio(page_folio(page), offset, len);
}
EXPORT_SYMBOL_GPL(iomap_invalidatepage);
#ifdef CONFIG_MIGRATION #ifdef CONFIG_MIGRATION
int int
iomap_migrate_page(struct address_space *mapping, struct page *newpage, iomap_migrate_page(struct address_space *mapping, struct page *newpage,
......
...@@ -81,7 +81,7 @@ DEFINE_EVENT(iomap_range_class, name, \ ...@@ -81,7 +81,7 @@ DEFINE_EVENT(iomap_range_class, name, \
TP_ARGS(inode, off, len)) TP_ARGS(inode, off, len))
DEFINE_RANGE_EVENT(iomap_writepage); DEFINE_RANGE_EVENT(iomap_writepage);
DEFINE_RANGE_EVENT(iomap_releasepage); DEFINE_RANGE_EVENT(iomap_releasepage);
DEFINE_RANGE_EVENT(iomap_invalidatepage); DEFINE_RANGE_EVENT(iomap_invalidate_folio);
DEFINE_RANGE_EVENT(iomap_dio_invalidate_fail); DEFINE_RANGE_EVENT(iomap_dio_invalidate_fail);
#define IOMAP_TYPE_STRINGS \ #define IOMAP_TYPE_STRINGS \
......
...@@ -569,7 +569,7 @@ const struct address_space_operations xfs_address_space_operations = { ...@@ -569,7 +569,7 @@ const struct address_space_operations xfs_address_space_operations = {
.writepages = xfs_vm_writepages, .writepages = xfs_vm_writepages,
.set_page_dirty = __set_page_dirty_nobuffers, .set_page_dirty = __set_page_dirty_nobuffers,
.releasepage = iomap_releasepage, .releasepage = iomap_releasepage,
.invalidatepage = iomap_invalidatepage, .invalidate_folio = iomap_invalidate_folio,
.bmap = xfs_vm_bmap, .bmap = xfs_vm_bmap,
.direct_IO = noop_direct_IO, .direct_IO = noop_direct_IO,
.migratepage = iomap_migrate_page, .migratepage = iomap_migrate_page,
......
...@@ -187,7 +187,7 @@ static const struct address_space_operations zonefs_file_aops = { ...@@ -187,7 +187,7 @@ static const struct address_space_operations zonefs_file_aops = {
.writepages = zonefs_writepages, .writepages = zonefs_writepages,
.set_page_dirty = __set_page_dirty_nobuffers, .set_page_dirty = __set_page_dirty_nobuffers,
.releasepage = iomap_releasepage, .releasepage = iomap_releasepage,
.invalidatepage = iomap_invalidatepage, .invalidate_folio = iomap_invalidate_folio,
.migratepage = iomap_migrate_page, .migratepage = iomap_migrate_page,
.is_partially_uptodate = iomap_is_partially_uptodate, .is_partially_uptodate = iomap_is_partially_uptodate,
.error_remove_page = generic_error_remove_page, .error_remove_page = generic_error_remove_page,
......
...@@ -230,8 +230,6 @@ void iomap_readahead(struct readahead_control *, const struct iomap_ops *ops); ...@@ -230,8 +230,6 @@ void iomap_readahead(struct readahead_control *, const struct iomap_ops *ops);
bool iomap_is_partially_uptodate(struct folio *, size_t from, size_t count); bool iomap_is_partially_uptodate(struct folio *, size_t from, size_t count);
int iomap_releasepage(struct page *page, gfp_t gfp_mask); int iomap_releasepage(struct page *page, gfp_t gfp_mask);
void iomap_invalidate_folio(struct folio *folio, size_t offset, size_t len); void iomap_invalidate_folio(struct folio *folio, size_t offset, size_t len);
void iomap_invalidatepage(struct page *page, unsigned int offset,
unsigned int len);
#ifdef CONFIG_MIGRATION #ifdef CONFIG_MIGRATION
int iomap_migrate_page(struct address_space *mapping, struct page *newpage, int iomap_migrate_page(struct address_space *mapping, struct page *newpage,
struct page *page, enum migrate_mode mode); struct page *page, enum migrate_mode mode);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment