Skip to content

Commit

Permalink
futex: use fast_gup()
Browse files Browse the repository at this point in the history
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 <a.p.zijlstra@chello.nl>
Acked-by: Nick Piggin <nickpiggin@yahoo.com.au>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
  • Loading branch information
Peter Zijlstra authored and Ingo Molnar committed Sep 30, 2008
1 parent 6127070 commit 734b05b
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions kernel/futex.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down

0 comments on commit 734b05b

Please sign in to comment.