]> 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>
Tue, 9 Oct 2012 03:12:27 +0000 (14:12 +1100)
commit39403cc3b7a77a1955b8788a9e5abb90f271f0ec
tree13799502d5063352e74d8b63999d89b00b54caa7
parent974a818e8a8b33006e6b2dc4962635448ded5471
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