linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] migration: migrate_vmas should check "vma"
@ 2009-01-28  7:26 Daisuke Nishimura
  2009-01-28 16:42 ` Christoph Lameter
  0 siblings, 1 reply; 6+ messages in thread
From: Daisuke Nishimura @ 2009-01-28  7:26 UTC (permalink / raw)
  To: Andrew Morton; +Cc: Christoph Lameter, LKML, linux-mm, nishimura

migrate_vmas() should check "vma" not "vma->vm_next" for for-loop condition.

Signed-off-by: Daisuke Nishimura <nishimura@mxp.nes.nec.co.jp>
---
 mm/migrate.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/mm/migrate.c b/mm/migrate.c
index 2bb4e1d..a9eff3f 100644
--- a/mm/migrate.c
+++ b/mm/migrate.c
@@ -1129,7 +1129,7 @@ int migrate_vmas(struct mm_struct *mm, const nodemask_t *to,
  	struct vm_area_struct *vma;
  	int err = 0;
 
- 	for(vma = mm->mmap; vma->vm_next && !err; vma = vma->vm_next) {
+	for (vma = mm->mmap; vma && !err; vma = vma->vm_next) {
  		if (vma->vm_ops && vma->vm_ops->migrate) {
  			err = vma->vm_ops->migrate(vma, to, from, flags);
  			if (err)

--
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>

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2009-01-30  0:43 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-01-28  7:26 [PATCH] migration: migrate_vmas should check "vma" Daisuke Nishimura
2009-01-28 16:42 ` Christoph Lameter
2009-01-28 16:55   ` Johannes Weiner
2009-01-29  1:16     ` Daisuke Nishimura
2009-01-29  8:18       ` Andrew Morton
2009-01-30  0:30         ` Daisuke Nishimura

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox