diff options
-rw-r--r-- | mm/filemap.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/mm/filemap.c b/mm/filemap.c index 96398d397e7..53cbace9181 100644 --- a/mm/filemap.c +++ b/mm/filemap.c @@ -1009,6 +1009,9 @@ find_page: goto page_not_up_to_date; if (!trylock_page(page)) goto page_not_up_to_date; + /* Did it get truncated before we got the lock? */ + if (!page->mapping) + goto page_not_up_to_date_locked; if (!mapping->a_ops->is_partially_uptodate(page, desc, offset)) goto page_not_up_to_date_locked; |