truncate: Convert invalidate_inode_pages2_range() to use a folio
authorMatthew Wilcox (Oracle) <willy@infradead.org>
Fri, 3 Dec 2021 04:25:01 +0000 (23:25 -0500)
committerMatthew Wilcox (Oracle) <willy@infradead.org>
Sat, 8 Jan 2022 05:28:41 +0000 (00:28 -0500)
commitfae9bc4a90176868cbbbecc693acb0ff2607818d
treeb10ea7a14846cd8ab3df9fcb8be844f756c7cfb2
parentccbbf761d440b0d5afcbf232db37435dc38d6161
truncate: Convert invalidate_inode_pages2_range() to use a folio

If we're going to unmap a folio, we have to be sure to unmap the entire
folio, not just the part of it which lies after the search index.

We cannot yet remove the struct page from invalidate_inode_pages2_range()
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>
mm/truncate.c