From 3c8d0e15d14cc51dfa8e7a0500a934343d0101d4 Mon Sep 17 00:00:00 2001 From: Minchan Kim Date: Fri, 28 Sep 2012 10:19:58 +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 7177da24b3fa..7c72c359f843 100644 --- a/mm/mempolicy.c +++ b/mm/mempolicy.c @@ -988,9 +988,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