From: Christoph Lameter Date: Thu, 12 Jan 2006 09:05:20 +0000 (-0800) Subject: [PATCH] migration: make sure there is no attempt to migrate reserved pages. X-Git-Tag: v2.6.16-rc1~281 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=f4598c8b3678abd65be3be00ed3d046375a4777e;p=linux-2.6-omap-h63xx.git [PATCH] migration: make sure there is no attempt to migrate reserved pages. This ensures that reserved pages are not migrated. Reserved pages currently cause the WARN_ON to trigger in migrate_page_add() Signed-off-by: Christoph Lameter Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/mm/mempolicy.c b/mm/mempolicy.c index 1850d0aef4a..b62cab575a8 100644 --- a/mm/mempolicy.c +++ b/mm/mempolicy.c @@ -208,6 +208,8 @@ static int check_pte_range(struct vm_area_struct *vma, pmd_t *pmd, page = vm_normal_page(vma, addr, *pte); if (!page) continue; + if (PageReserved(page)) + continue; nid = page_to_nid(page); if (node_isset(nid, *nodes) == !!(flags & MPOL_MF_INVERT)) continue; @@ -290,7 +292,7 @@ static inline int check_pgd_range(struct vm_area_struct *vma, static inline int vma_migratable(struct vm_area_struct *vma) { if (vma->vm_flags & ( - VM_LOCKED|VM_IO|VM_HUGETLB|VM_PFNMAP)) + VM_LOCKED|VM_IO|VM_HUGETLB|VM_PFNMAP|VM_RESERVED)) return 0; return 1; }