summaryrefslogtreecommitdiffstats
path: root/kernel/futex.c
diff options
context:
space:
mode:
authorJeff Garzik <jgarzik@pobox.com>2005-10-30 07:58:41 +0100
committerJeff Garzik <jgarzik@pobox.com>2005-10-30 07:58:41 +0100
commitfce45c1c8a6b5334fa88bbb9b1496b0699d3fef0 (patch)
treecba2597077cf33d122f8d771bf84618cc5374cf6 /kernel/futex.c
parentMerge branch 'master' (diff)
parentMerge branch 'master' (diff)
downloadlinux-fce45c1c8a6b5334fa88bbb9b1496b0699d3fef0.tar.xz
linux-fce45c1c8a6b5334fa88bbb9b1496b0699d3fef0.zip
Merge branch 'upstream'
Diffstat (limited to 'kernel/futex.c')
-rw-r--r--kernel/futex.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/kernel/futex.c b/kernel/futex.c
index ca05fe6a70b2..3b4d5ad44cc6 100644
--- a/kernel/futex.c
+++ b/kernel/futex.c
@@ -205,15 +205,13 @@ static int get_futex_key(unsigned long uaddr, union futex_key *key)
/*
* Do a quick atomic lookup first - this is the fastpath.
*/
- spin_lock(&current->mm->page_table_lock);
- page = follow_page(mm, uaddr, 0);
+ page = follow_page(mm, uaddr, FOLL_TOUCH|FOLL_GET);
if (likely(page != NULL)) {
key->shared.pgoff =
page->index << (PAGE_CACHE_SHIFT - PAGE_SHIFT);
- spin_unlock(&current->mm->page_table_lock);
+ put_page(page);
return 0;
}
- spin_unlock(&current->mm->page_table_lock);
/*
* Do it the general way.