--- mm/filemap.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/mm/filemap.c b/mm/filemap.c index f3b448431bd4..7dfd7024d361 100644 --- a/mm/filemap.c +++ b/mm/filemap.c @@ -1941,6 +1941,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)) -- 2.29.2