From 6fac72a74917f04f0a61c7bc7198c94e5572a526 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 9b7e014f4134..4a65b4d870a1 100644 --- a/mm/mempolicy.c +++ b/mm/mempolicy.c @@ -972,9 +972,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