]> git.karo-electronics.de Git - karo-tx-linux.git/commit
mm: revert 0def08e3 ("mm/mempolicy.c: check return code of check_range")
authorMinchan Kim <minchan@kernel.org>
Fri, 21 Sep 2012 01:01:43 +0000 (11:01 +1000)
committerStephen Rothwell <sfr@canb.auug.org.au>
Fri, 21 Sep 2012 05:59:00 +0000 (15:59 +1000)
commit1238ea0ec6ff786099880edd27840cd8dbd699cd
tree9a2162b953df61e8a2f9a41ee79e93c0d95b1b04
parentdc3f38c8a5ef6c431780c73ca66734521a7012b2
mm: revert 0def08e3 ("mm/mempolicy.c: check return code of check_range")

Revert 0def08e3 because check_range can't fail in migrate_to_node with
considering current usecases.

Quote from Johannes

: I think it makes sense to revert.  Not because of the semantics, but I
: just don't see how check_range() could even fail for this callsite:
:
: 1. we pass mm->mmap->vm_start in there, so we should not fail due to
:    find_vma()
:
: 2. we pass MPOL_MF_DISCONTIG_OK, so the discontig checks do not apply
:    and so can not fail
:
: 3. we pass MPOL_MF_MOVE | MPOL_MF_MOVE_ALL, the page table loops will
:    continue until addr == end, so we never fail with -EIO

And I added a new VM_BUG_ON for checking migrate_to_node's future usecase
which might pass to MPOL_MF_STRICT.

Suggested-by: Johannes Weiner <hannes@cmpxchg.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