]> git.karo-electronics.de Git - karo-tx-linux.git/commit
mm rmap: remove vma_address check for address inside vma
authorMichel Lespinasse <walken@google.com>
Fri, 28 Sep 2012 00:19:34 +0000 (10:19 +1000)
committerStephen Rothwell <sfr@canb.auug.org.au>
Fri, 5 Oct 2012 04:00:59 +0000 (14:00 +1000)
commitc3733648ff8c78252fa3d926d81b46b7f43d31e9
tree4f9ff9847a7169cb93db69f759804de17a5bde2c
parentb068f14e7cc25e8ef0ae3c6c8396e34d09c54425
mm rmap: remove vma_address check for address inside vma

In file and anon rmap, we use interval trees to find potentially relevant
vmas and then call vma_address() to find the virtual address the given
page might be found at in these vmas.  vma_address() used to include a
check that the returned address falls within the limits of the vma, but
this check isn't necessary now that we always use interval trees in rmap:
the interval tree just doesn't return any vmas which this check would find
to be irrelevant.  As a result, we can replace the use of -EFAULT error
code (which then needed to be checked in every call site) with a
VM_BUG_ON().

Signed-off-by: Michel Lespinasse <walken@google.com>
Cc: Andrea Arcangeli <aarcange@redhat.com>
Cc: Rik van Riel <riel@redhat.com>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Daniel Santos <daniel.santos@pobox.com>
Cc: Hugh Dickins <hughd@google.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
mm/huge_memory.c
mm/rmap.c