]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
mm: enhance comment and bug check
authorMinchan Kim <minchan@kernel.org>
Wed, 26 Sep 2012 01:34:00 +0000 (11:34 +1000)
committerStephen Rothwell <sfr@canb.auug.org.au>
Thu, 27 Sep 2012 07:27:09 +0000 (17:27 +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 9b7e014f41347f25724bd62a947a01c078ce8daa..4a65b4d870a1f74cf9fb17164a7ad9949a6c0f59 100644 (file)
@@ -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);