truncate,shmem: Add truncate_inode_folio()
authorMatthew Wilcox (Oracle) <willy@infradead.org>
Thu, 2 Dec 2021 21:01:55 +0000 (16:01 -0500)
committerMatthew Wilcox (Oracle) <willy@infradead.org>
Sat, 8 Jan 2022 05:28:41 +0000 (00:28 -0500)
commit1e84a3d997b74c33491899e31d48774f252213ab
tree8d187a44f9360b3c7fd73304939d331e05fc4682
parent7b774aab7941e195d3130caa856da6904333988b
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>
include/linux/mm.h
mm/internal.h
mm/shmem.c
mm/truncate.c