提交 e88dd6c1 编写于 作者: P Peter Zijlstra 提交者: Linus Torvalds

[PATCH] mm: small cleanup of install_page()

Smallish cleanup to install_page(), could save a memory read (haven't checked
the asm output) and sure looks nicer.
Signed-off-by: NPeter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Hugh Dickins <hugh@veritas.com>
Signed-off-by: NAndrew Morton <akpm@osdl.org>
Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
上级 c1e6098b
...@@ -79,9 +79,9 @@ int install_page(struct mm_struct *mm, struct vm_area_struct *vma, ...@@ -79,9 +79,9 @@ int install_page(struct mm_struct *mm, struct vm_area_struct *vma,
inc_mm_counter(mm, file_rss); inc_mm_counter(mm, file_rss);
flush_icache_page(vma, page); 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); page_add_file_rmap(page);
pte_val = *pte;
update_mmu_cache(vma, addr, pte_val); update_mmu_cache(vma, addr, pte_val);
lazy_mmu_prot_update(pte_val); lazy_mmu_prot_update(pte_val);
err = 0; err = 0;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册