summaryrefslogtreecommitdiffstats
path: root/mm/internal.h
diff options
context:
space:
mode:
authorMatthew Wilcox (Oracle) <willy@infradead.org>2020-05-27 17:59:22 -0400
committerMatthew Wilcox (Oracle) <willy@infradead.org>2022-01-08 00:28:41 -0500
commitb9a8a4195c7d3a51235a4fc974a46ad4e9689ffd (patch)
tree48f7ce0a78ed104be739fb45bfca21cbaf351a44 /mm/internal.h
parentf6357c3a9d3ea5a00c5bf52845b633d649da6722 (diff)
downloadlinux-b9a8a4195c7d3a51235a4fc974a46ad4e9689ffd.tar.gz
linux-b9a8a4195c7d3a51235a4fc974a46ad4e9689ffd.tar.bz2
linux-b9a8a4195c7d3a51235a4fc974a46ad4e9689ffd.zip
truncate,shmem: Handle truncates that split large folios
Handle folio splitting in the parts of the truncation functions which already handle partial pages. Factor all that code out into a new function called truncate_inode_partial_folio(). Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org> Reviewed-by: Jan Kara <jack@suse.cz> Reviewed-by: William Kucharski <william.kucharski@oracle.com>
Diffstat (limited to 'mm/internal.h')
-rw-r--r--mm/internal.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/mm/internal.h b/mm/internal.h
index c52c05dc6b1f..26af8a5a5be3 100644
--- a/mm/internal.h
+++ b/mm/internal.h
@@ -98,6 +98,8 @@ unsigned find_get_entries(struct address_space *mapping, pgoff_t start,
pgoff_t end, struct folio_batch *fbatch, pgoff_t *indices);
void filemap_free_folio(struct address_space *mapping, struct folio *folio);
int truncate_inode_folio(struct address_space *mapping, struct folio *folio);
+bool truncate_inode_partial_folio(struct folio *folio, loff_t start,
+ loff_t end);
/**
* folio_evictable - Test whether a folio is evictable.