diff --git a/mm/filemap.c b/mm/filemap.c index 533f271d6839..fc7818b4537e 100644 --- a/mm/filemap.c +++ b/mm/filemap.c @@ -2540,7 +2540,7 @@ vm_fault_t filemap_fault(struct vm_fault *vmf) goto out_retry; /* Did it get truncated? */ - if (unlikely(page->mapping != mapping)) { + if (unlikely(compound_head(page)->mapping != mapping)) { unlock_page(page); put_page(page); goto retry_find;