summaryrefslogtreecommitdiffstats
path: root/kernel/futex.c
diff options
context:
space:
mode:
authorHugh Dickins <hugh@veritas.com>2005-11-23 22:37:38 +0100
committerLinus Torvalds <torvalds@g5.osdl.org>2005-11-24 01:08:38 +0100
commitcc3327e7dfc16a9a3e164075234c869867a59e45 (patch)
treed120c13540a7fa4769c0bf53eb12628a76366631 /kernel/futex.c
parent[PATCH] mm: update split ptlock Kconfig (diff)
downloadlinux-cc3327e7dfc16a9a3e164075234c869867a59e45.tar.xz
linux-cc3327e7dfc16a9a3e164075234c869867a59e45.zip
[PATCH] mm: unbloat get_futex_key
The follow_page changes in get_futex_key have left it with two almost identical blocks, when handling the rare case of a futex in a nonlinear vma. get_user_pages will itself do that follow_page, and its additional find_extend_vma is hardly any overhead since the vma is already cached. Let's just delete the follow_page block and let get_user_pages do it. Signed-off-by: Hugh Dickins <hugh@veritas.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'kernel/futex.c')
-rw-r--r--kernel/futex.c15
1 files changed, 0 insertions, 15 deletions
diff --git a/kernel/futex.c b/kernel/futex.c
index aca8d10704f6..5872e3507f35 100644
--- a/kernel/futex.c
+++ b/kernel/futex.c
@@ -201,21 +201,6 @@ static int get_futex_key(unsigned long uaddr, union futex_key *key)
* from swap. But that's a lot of code to duplicate here
* for a rare case, so we simply fetch the page.
*/
-
- /*
- * Do a quick atomic lookup first - this is the fastpath.
- */
- page = follow_page(mm, uaddr, FOLL_TOUCH|FOLL_GET);
- if (likely(page != NULL)) {
- key->shared.pgoff =
- page->index << (PAGE_CACHE_SHIFT - PAGE_SHIFT);
- put_page(page);
- return 0;
- }
-
- /*
- * Do it the general way.
- */
err = get_user_pages(current, mm, uaddr, 1, 0, 0, &page, NULL);
if (err >= 0) {
key->shared.pgoff =