mm/truncate: Inline invalidate_complete_page() into its one caller
authorMatthew Wilcox (Oracle) <willy@infradead.org>
Sat, 12 Feb 2022 20:27:42 +0000 (15:27 -0500)
committerMatthew Wilcox (Oracle) <willy@infradead.org>
Thu, 17 Feb 2022 22:05:53 +0000 (17:05 -0500)
commit042c4f32323beb28146c658202d3e69899e4f245
tree0b88bfc4039671d359ec3ec8c228fb59dc575211
parent51608e9c130896e7d11d0d83b0df21443eaddc49
mm/truncate: Inline invalidate_complete_page() into its one caller

invalidate_inode_page() is the only caller of invalidate_complete_page()
and inlining it reveals that the first check is unnecessary (because we
hold the page locked, and we just retrieved the mapping from the page).
Actually, it does make a difference, in that tail pages no longer fail
at this check, so it's now possible to remove a tail page from a mapping.

Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Reviewed-by: John Hubbard <jhubbard@nvidia.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
kernel/futex/core.c
mm/truncate.c