OSDN Git Service

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>
Mon, 21 Mar 2022 16:59:01 +0000 (12:59 -0400)
commit1b8ddbeeb9b819e62b7190115023ce858a159f5c
tree46665243b7be89ad71c6e56b1e8ae42923369a90
parentb9ccad2e5d385ceaa19b5c05cf69a09de02eb35a
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