From: Peter Zijlstra Date: Fri, 26 Sep 2008 17:32:22 +0000 (+0200) Subject: futex: use fast_gup() X-Git-Tag: v2.6.29-rc1~572^2~4^3~2 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=734b05b10e51d4ba38c8fc3ee02e846aab09eedf;p=karo-tx-linux.git futex: use fast_gup() Change the get_user_pages() call with fast_gup() which doesn't require holding the mmap_sem thereby removing the mmap_sem from all fast paths. Signed-off-by: Peter Zijlstra Acked-by: Nick Piggin Signed-off-by: Ingo Molnar --- diff --git a/kernel/futex.c b/kernel/futex.c index 6a726684217e..facf17d1a705 100644 --- a/kernel/futex.c +++ b/kernel/futex.c @@ -232,9 +232,7 @@ static int get_futex_key(u32 __user *uaddr, struct rw_semaphore *fshared, } again: - down_read(&mm->mmap_sem); - err = get_user_pages(current, mm, address, 1, 0, 0, &page, NULL); - up_read(&mm->mmap_sem); + err = get_user_pages_fast(address, 1, 0, &page); if (err < 0) return err;