]> 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>
Wed, 26 Sep 2012 05:45:09 +0000 (15:45 +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 9ec87bd0781b49e9c169901662612a7259ffca92..0b78fb9ea65b60afa08287f0eff1d797d75c9a7e 100644 (file)
@@ -951,9 +951,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);