truncate,shmem: Handle truncates that split large folios
authorMatthew Wilcox (Oracle) <willy@infradead.org>
Wed, 27 May 2020 21:59:22 +0000 (17:59 -0400)
committerMatthew Wilcox (Oracle) <willy@infradead.org>
Sat, 8 Jan 2022 05:28:41 +0000 (00:28 -0500)
commitb9a8a4195c7d3a51235a4fc974a46ad4e9689ffd
tree48f7ce0a78ed104be739fb45bfca21cbaf351a44
parentf6357c3a9d3ea5a00c5bf52845b633d649da6722
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>
mm/internal.h
mm/shmem.c
mm/truncate.c