summaryrefslogtreecommitdiffstats
path: root/mm/internal.h
diff options
context:
space:
mode:
authorMatthew Wilcox (Oracle) <willy@infradead.org>2021-12-02 16:01:55 -0500
committerMatthew Wilcox (Oracle) <willy@infradead.org>2022-01-08 00:28:41 -0500
commit1e84a3d997b74c33491899e31d48774f252213ab (patch)
tree8d187a44f9360b3c7fd73304939d331e05fc4682 /mm/internal.h
parent7b774aab7941e195d3130caa856da6904333988b (diff)
truncate,shmem: Add truncate_inode_folio()
Convert all callers of truncate_inode_page() to call truncate_inode_folio() instead, and move the declaration to mm/internal.h. Move the assertion that the caller is not passing in a tail page to generic_error_remove_page(). We can't entirely remove the struct page from the callers yet because the page pointer in the pvec might be a shadow/dax/swap entry instead of actually a page. 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/internal.h')
-rw-r--r--mm/internal.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/mm/internal.h b/mm/internal.h
index 1ca93c6cb18c..f9967b0be8bf 100644
--- a/mm/internal.h
+++ b/mm/internal.h
@@ -92,6 +92,7 @@ static inline void force_page_cache_readahead(struct address_space *mapping,
unsigned find_lock_entries(struct address_space *mapping, pgoff_t start,
pgoff_t end, struct pagevec *pvec, pgoff_t *indices);
+int truncate_inode_folio(struct address_space *mapping, struct folio *folio);
/**
* folio_evictable - Test whether a folio is evictable.