From: Matthew Wilcox (Oracle) Date: Thu, 31 Dec 2020 22:04:19 +0000 (+0000) Subject: fix mm-add-and-use-find_lock_entries.patch X-Git-Tag: howlett/maple_spf/20210104~136 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=5e9e5d33de5afed8e71e85546bb4c91789100d35;p=users%2Fjedix%2Flinux-maple.git fix mm-add-and-use-find_lock_entries.patch Link: https://lkml.kernel.org/r/20201124041507.28996-3-willy@infradead.org Signed-off-by: Andrew Morton --- diff --git a/mm/filemap.c b/mm/filemap.c index 9a1ac0b16105..682a0d3f0a78 100644 --- a/mm/filemap.c +++ b/mm/filemap.c @@ -1972,6 +1972,8 @@ unsigned find_lock_entries(struct address_space *mapping, pgoff_t start, goto put; if (page->mapping != mapping || PageWriteback(page)) goto unlock; + VM_BUG_ON_PAGE(!thp_contains(page, xas.xa_index), + page); } indices[pvec->nr] = xas.xa_index; if (!pagevec_add(pvec, page))