[PATCH] page migration: handle freeing of pages in migrate_pages()
Do not leave pages on the lists passed to migrate_pages(). Seems that we will not need any postprocessing of pages. This will simplify the handling of pages by the callers of migrate_pages(). Signed-off-by: Christoph Lameter <clameter@sgi.com> Cc: Hugh Dickins <hugh@veritas.com> Cc: Jes Sorensen <jes@trained-monkey.org> Cc: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com> Cc: Lee Schermerhorn <lee.schermerhorn@hp.com> Cc: Andi Kleen <ak@muc.de> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
This commit is contained in:

committed by
Linus Torvalds

parent
e24f0b8f76
commit
aaa994b300
@@ -603,11 +603,8 @@ int migrate_to_node(struct mm_struct *mm, int source, int dest, int flags)
|
||||
check_range(mm, mm->mmap->vm_start, TASK_SIZE, &nmask,
|
||||
flags | MPOL_MF_DISCONTIG_OK, &pagelist);
|
||||
|
||||
if (!list_empty(&pagelist)) {
|
||||
if (!list_empty(&pagelist))
|
||||
err = migrate_pages_to(&pagelist, NULL, dest);
|
||||
if (!list_empty(&pagelist))
|
||||
putback_lru_pages(&pagelist);
|
||||
}
|
||||
return err;
|
||||
}
|
||||
|
||||
@@ -773,9 +770,6 @@ long do_mbind(unsigned long start, unsigned long len,
|
||||
err = -EIO;
|
||||
}
|
||||
|
||||
if (!list_empty(&pagelist))
|
||||
putback_lru_pages(&pagelist);
|
||||
|
||||
up_write(&mm->mmap_sem);
|
||||
mpol_free(new);
|
||||
return err;
|
||||
|
Reference in New Issue
Block a user