mm/truncate: Split invalidate_inode_page() into mapping_evict_folio()
authorMatthew Wilcox (Oracle) <willy@infradead.org>
Sun, 13 Feb 2022 20:22:28 +0000 (15:22 -0500)
committerMatthew Wilcox (Oracle) <willy@infradead.org>
Mon, 21 Mar 2022 16:59:02 +0000 (12:59 -0400)
commitd6c75dc22c755c567838f12f12a16f2a323ebd4e
tree78954666fd026403b0ee17150063a927b5ff7f86
parent5100da38ef3c33d9ad8b60b29c2b671249bf7e1d
mm/truncate: Split invalidate_inode_page() into mapping_evict_folio()

Some of the callers already have the address_space and can avoid calling
folio_mapping() and checking if the folio was already truncated.  Also
add kernel-doc and fix the return type (in case we ever support folios
larger than 4TB).

Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Miaohe Lin <linmiaohe@huawei.com>
include/linux/mm.h
mm/internal.h
mm/memory-failure.c
mm/truncate.c