]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
[PATCH] mm: small cleanup of install_page()
authorPeter Zijlstra <a.p.zijlstra@chello.nl>
Tue, 26 Sep 2006 06:30:59 +0000 (23:30 -0700)
committerLinus Torvalds <torvalds@g5.osdl.org>
Tue, 26 Sep 2006 15:48:44 +0000 (08:48 -0700)
Smallish cleanup to install_page(), could save a memory read (haven't checked
the asm output) and sure looks nicer.

Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Hugh Dickins <hugh@veritas.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
mm/fremap.c

index 21b7d0cbc98c6eed4c859cebc825ee2c3d715ee1..aa30618ec6b2cd356c57896a2099a3e4b2a5e39c 100644 (file)
@@ -79,9 +79,9 @@ int install_page(struct mm_struct *mm, struct vm_area_struct *vma,
                inc_mm_counter(mm, file_rss);
 
        flush_icache_page(vma, page);
-       set_pte_at(mm, addr, pte, mk_pte(page, prot));
+       pte_val = mk_pte(page, prot);
+       set_pte_at(mm, addr, pte, pte_val);
        page_add_file_rmap(page);
-       pte_val = *pte;
        update_mmu_cache(vma, addr, pte_val);
        lazy_mmu_prot_update(pte_val);
        err = 0;