From: Christoph Lameter Signed-off-by: Christoph Lameter Cc: Nick Piggin Signed-off-by: Andrew Morton --- mm/mempolicy.c | 11 +++++++++++ 1 files changed, 11 insertions(+) diff -puN mm/mempolicy.c~mm-migration-page-refcounting-fix-2 mm/mempolicy.c --- 25/mm/mempolicy.c~mm-migration-page-refcounting-fix-2 Tue Jan 17 15:33:19 2006 +++ 25-akpm/mm/mempolicy.c Tue Jan 17 15:33:19 2006 @@ -208,6 +208,17 @@ static int check_pte_range(struct vm_are page = vm_normal_page(vma, addr, *pte); if (!page) continue; + /* + * The check for PageReserved here is important to avoid + * handling zero pages and other pages that may have been + * marked special by the system. + * + * If the PageReserved would not be checked here then f.e. + * the location of the zero page could have an influence + * on MPOL_MF_STRICT, zero pages would be counted for + * the per node stats, and there would be useless attempts + * to put zero pages on the migration list. + */ if (PageReserved(page)) continue; nid = page_to_nid(page); _