]> 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>
Thu, 4 Oct 2012 05:03:24 +0000 (15:03 +1000)
commitcc28e043de1abf502c1b64304a75d1d06c1d35f7
tree67ac402fb40ddcc578439f14410d1b85dbc9df12
parent4e7c4ab8bd26b0797efb2b6aa024436526eedf3c
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