Commit 6fd96437 authored by Andrew Morton's avatar Andrew Morton Committed by Linus Torvalds

[PATCH] vmalloc_to_page() preempt cleanup

remove unneeded preempt_disable/enable.  pte_offset_map/unmap already does
that.
Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent a2d421a9
...@@ -1778,13 +1778,11 @@ struct page * vmalloc_to_page(void * vmalloc_addr) ...@@ -1778,13 +1778,11 @@ struct page * vmalloc_to_page(void * vmalloc_addr)
if (!pgd_none(*pgd)) { if (!pgd_none(*pgd)) {
pmd = pmd_offset(pgd, addr); pmd = pmd_offset(pgd, addr);
if (!pmd_none(*pmd)) { if (!pmd_none(*pmd)) {
preempt_disable();
ptep = pte_offset_map(pmd, addr); ptep = pte_offset_map(pmd, addr);
pte = *ptep; pte = *ptep;
if (pte_present(pte)) if (pte_present(pte))
page = pte_page(pte); page = pte_page(pte);
pte_unmap(ptep); pte_unmap(ptep);
preempt_enable();
} }
} }
return page; return page;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment