Re: [v2][PATCH] [v2] Revalidate page->mapping indo_generic_file_read()

From: Andrew Morton
Date: Mon Nov 08 2010 - 19:07:16 EST


On Fri, 05 Nov 2010 14:16:15 -0700
Dave Hansen <dave@xxxxxxxxxxxxxxxxxx> wrote:

> --- linux-2.6.git/mm/filemap.c~is_partially_uptodate-revalidate-page 2010-11-03 13:49:21.000000000 -0700
> +++ linux-2.6.git-dave/mm/filemap.c 2010-11-04 06:59:08.000000000 -0700
> @@ -1016,6 +1016,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;

whoops.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/