linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Christoph Lameter <clameter@sgi.com>
To: akpm@osdl.org
Cc: Hugh Dickins <hugh@veritas.com>,
	linux-ia64@vger.kernel.org,
	Peter Zijlstra <a.p.zijlstra@chello.nl>,
	Lee Schermerhorn <lee.schermerhorn@hp.com>,
	Nick Piggin <nickpiggin@yahoo.com.au>,
	linux-mm@kvack.org, Andi Kleen <ak@suse.de>,
	Christoph Lameter <clameter@sgi.com>,
	KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Subject: [1/5] follow_page: do not put_page if FOLL_GET not specified.
Date: Tue, 23 May 2006 10:43:49 -0700 (PDT)	[thread overview]
Message-ID: <20060523174349.10156.22044.sendpatchset@schroedinger.engr.sgi.com> (raw)
In-Reply-To: <20060523174344.10156.66845.sendpatchset@schroedinger.engr.sgi.com>

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>
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, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

  reply	other threads:[~2006-05-23 17:43 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-05-23 17:43 [0/5] sys_move_pages() updates Christoph Lameter
2006-05-23 17:43 ` Christoph Lameter [this message]
2006-05-23 18:29   ` [1/5] follow_page: do not put_page if FOLL_GET not specified Peter Zijlstra
2006-05-23 17:43 ` [2/5] extract common code to have_task_perm() Christoph Lameter
2006-05-23 17:43 ` [3/5] move_pages: lots of fixups Christoph Lameter
2006-05-23 17:44 ` [4/5] move_pages: x86_64 support Christoph Lameter
2006-05-23 17:44 ` [5/5] move_pages: 32bit support (i386,x86_64 and ia64) Christoph Lameter
2006-05-24 20:32   ` Andrew Morton
2006-05-24 20:33     ` Jens Axboe

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20060523174349.10156.22044.sendpatchset@schroedinger.engr.sgi.com \
    --to=clameter@sgi.com \
    --cc=a.p.zijlstra@chello.nl \
    --cc=ak@suse.de \
    --cc=akpm@osdl.org \
    --cc=hugh@veritas.com \
    --cc=kamezawa.hiroyu@jp.fujitsu.com \
    --cc=lee.schermerhorn@hp.com \
    --cc=linux-ia64@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=nickpiggin@yahoo.com.au \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox