]> git.karo-electronics.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>
Fri, 5 Oct 2012 04:01:11 +0000 (14:01 +1000)
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 7177da24b3fade0d28a180c9911c703a81f00cd8..7c72c359f843c7a2739f9b21d30966591bc8df29 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);