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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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, send a message with 'unsubscribe linux-mm' in
the body to majordomo@xxxxxxxxxx  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Fight unfair telecom policy in Canada: sign http://dissolvethecrtc.ca/
Don't email: <a href=mailto:"dont@xxxxxxxxx";> email@xxxxxxxxx </a>


[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]