]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
mm: enhance comment and bug check
authorMinchan Kim <minchan@kernel.org>
Fri, 28 Sep 2012 00:19:58 +0000 (10:19 +1000)
committerStephen Rothwell <sfr@canb.auug.org.au>
Mon, 8 Oct 2012 03:00:18 +0000 (14:00 +1100)
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 <hannes@cmpxchg.org>
Signed-off-by: Minchan Kim <minchan@kernel.org>
Signed-off-by: Minchan Kim <minchan@kernel.org>
Acked-by: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
Cc: Mel Gorman <mgorman@suse.de>
Cc: Christoph Lameter <cl@linux.com>
Cc: David Rientjes <rientjes@google.com>
Cc: Vasiliy Kulikov <segooon@gmail.com>
Cc: Johannes Weiner <hannes@cmpxchg.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
mm/mempolicy.c

index ce22e9280ac84c81dbb6e401942b3fd0ac065dcc..6eba7e77c00d05928cab1e12b944b3a213036a68 100644 (file)
@@ -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);