diff --git a/[refs] b/[refs] index e9f3feb38bc5..67f58e9d1175 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 834b40380e93e36f1c9b48ec1d280cebe3d7bd8c +refs/heads/master: 8d056cb965b8fb7c53c564abf28b1962d1061cd3 diff --git a/trunk/mm/filemap.c b/trunk/mm/filemap.c index 61ba5e405791..4ee2e998e937 100644 --- a/trunk/mm/filemap.c +++ b/trunk/mm/filemap.c @@ -1029,6 +1029,9 @@ static void do_generic_file_read(struct file *filp, loff_t *ppos, 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;