Commit cc3327e7dfc16a9a3e164075234c869867a59e45
Committed by
Linus Torvalds
1 parent
7b6ac9dffe
Exists in
master
and in
7 other branches
[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>
Showing 1 changed file with 0 additions and 15 deletions Side-by-side Diff
kernel/futex.c
... | ... | @@ -201,21 +201,6 @@ |
201 | 201 | * from swap. But that's a lot of code to duplicate here |
202 | 202 | * for a rare case, so we simply fetch the page. |
203 | 203 | */ |
204 | - | |
205 | - /* | |
206 | - * Do a quick atomic lookup first - this is the fastpath. | |
207 | - */ | |
208 | - page = follow_page(mm, uaddr, FOLL_TOUCH|FOLL_GET); | |
209 | - if (likely(page != NULL)) { | |
210 | - key->shared.pgoff = | |
211 | - page->index << (PAGE_CACHE_SHIFT - PAGE_SHIFT); | |
212 | - put_page(page); | |
213 | - return 0; | |
214 | - } | |
215 | - | |
216 | - /* | |
217 | - * Do it the general way. | |
218 | - */ | |
219 | 204 | err = get_user_pages(current, mm, uaddr, 1, 0, 0, &page, NULL); |
220 | 205 | if (err >= 0) { |
221 | 206 | key->shared.pgoff = |