]> git.karo-electronics.de Git - karo-tx-linux.git/commit
mm: directly use __mlock_vma_pages_range() in find_extend_vma()
authorMichel Lespinasse <walken@google.com>
Wed, 20 Feb 2013 02:14:08 +0000 (13:14 +1100)
committerStephen Rothwell <sfr@canb.auug.org.au>
Wed, 20 Feb 2013 05:52:26 +0000 (16:52 +1100)
commitded22e7a52e04f0aed854a55adadaf3090a065e2
tree9c02e08c3b5d10ee9b3280d1d8b8ace12bab7359
parentdf8bbd345b9e501969bfd59a78926043de84e57d
mm: directly use __mlock_vma_pages_range() in find_extend_vma()

In find_extend_vma(), we don't need mlock_vma_pages_range() to verify the
vma type - we know we're working with a stack. So, we can call directly
into __mlock_vma_pages_range(), and remove the last make_pages_present()
call site.

Note that we don't use mm_populate() here, so we can't release the mmap_sem
while allocating new stack pages. This is deemed acceptable, because the
stack vmas grow by a bounded number of pages at a time, and these are
anon pages so we don't have to read from disk to populate them.

Signed-off-by: Michel Lespinasse <walken@google.com>
Acked-by: Rik van Riel <riel@redhat.com>
Tested-by: Andy Lutomirski <luto@amacapital.net>
Cc: Greg Ungerer <gregungerer@westnet.com.au>
Cc: David Howells <dhowells@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
include/linux/mm.h
mm/internal.h
mm/memory.c
mm/mlock.c
mm/mmap.c