Re: [1/5] follow_page: do not put_page if FOLL_GET not specified.

From: Peter Zijlstra <a.p.zijlstra_at_chello.nl>
Date: 2006-05-24 04:29:10
On Tue, 2006-05-23 at 10:43 -0700, Christoph Lameter wrote:
> follow: no put_page() if FOLL_GET not specified.
> 
> Seems that one of the side effects of the dirty pages patch in
> 2.6.17-rc4-mm3 is that follow_pages does a page_put if FOLL_GET is
> not set in the flags passed to it. This breaks sys_move_pages()
> page status determination.
> 
> Only put_page if we did a get_page() before.
> 
> Signed-off-by: Christoph Lameter <clameter@sgi.com>
Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>

However, Andrew dropped the patches from -mm. I'll do a new series that
incorporates the suggestions from Hugh.

> Index: linux-2.6.17-rc4-mm3/mm/memory.c
> ===================================================================
> --- linux-2.6.17-rc4-mm3.orig/mm/memory.c	2006-05-22 18:03:32.280767264 -0700
> +++ linux-2.6.17-rc4-mm3/mm/memory.c	2006-05-23 10:01:48.917295988 -0700
> @@ -964,7 +964,7 @@ struct page *follow_page(struct vm_area_
>  			set_page_dirty(page);
>  		mark_page_accessed(page);
>  	}
> -	if (!(flags & FOLL_GET))
> +	if (!(flags & FOLL_GET) && (flags & FOLL_TOUCH))
>  		put_page(page);
>  	goto out;
>  

-
To unsubscribe from this list: send the line "unsubscribe linux-ia64" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Received on Wed May 24 04:29:56 2006

This archive was generated by hypermail 2.1.8 : 2006-05-24 04:30:12 EST