From 47a484cb36923e0c529912a5ca2d88b8351341d5 Mon Sep 17 00:00:00 2001 From: Minchan Kim Date: Wed, 26 Sep 2012 11:34:00 +1000 Subject: [PATCH] mm: enhance comment and bug check This patch updates comment and bug check. It can be fold into [1]. [1] mm-revert-0def08e3-mm-mempolicyc-check-return-code-of-check_range.patch Suggested-by: Johannes Weiner Signed-off-by: Minchan Kim Signed-off-by: Minchan Kim Acked-by: KOSAKI Motohiro Cc: Mel Gorman Cc: Christoph Lameter Cc: David Rientjes Cc: Vasiliy Kulikov Cc: Johannes Weiner Signed-off-by: Andrew Morton --- mm/mempolicy.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/mm/mempolicy.c b/mm/mempolicy.c index 9ec87bd0781b..0b78fb9ea65b 100644 --- a/mm/mempolicy.c +++ b/mm/mempolicy.c @@ -951,9 +951,11 @@ static int migrate_to_node(struct mm_struct *mm, int source, int dest, node_set(source, nmask); /* - * Collect migrate pages and it shoudn't be failed. + * This does not "check" the range but isolates all pages that + * need migration. Between passing in the full user address + * space range and MPOL_MF_DISCONTIG_OK, this call can not fail. */ - VM_BUG_ON(flags & MPOL_MF_STRICT); + VM_BUG_ON(!(flags & (MPOL_MF_MOVE | MPOL_MF_MOVE_ALL))); check_range(mm, mm->mmap->vm_start, mm->task_size, &nmask, flags | MPOL_MF_DISCONTIG_OK, &pagelist); -- 2.39.5