diff options
author | Peter Zijlstra <a.p.zijlstra@chello.nl> | 2008-09-26 13:32:22 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-09-30 06:35:46 -0400 |
commit | 734b05b10e51d4ba38c8fc3ee02e846aab09eedf (patch) | |
tree | f9d98cdeb64e2077a77fb8f65b4ab7e331b6fca9 /kernel/futex.c | |
parent | 61270708ecf1cda148e84fbf6e0703ee5aa81814 (diff) |
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 <a.p.zijlstra@chello.nl>
Acked-by: Nick Piggin <nickpiggin@yahoo.com.au>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'kernel/futex.c')
-rw-r--r-- | kernel/futex.c | 4 |
1 files changed, 1 insertions, 3 deletions
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, | |||
232 | } | 232 | } |
233 | 233 | ||
234 | again: | 234 | again: |
235 | down_read(&mm->mmap_sem); | 235 | err = get_user_pages_fast(address, 1, 0, &page); |
236 | err = get_user_pages(current, mm, address, 1, 0, 0, &page, NULL); | ||
237 | up_read(&mm->mmap_sem); | ||
238 | if (err < 0) | 236 | if (err < 0) |
239 | return err; | 237 | return err; |
240 | 238 | ||