diff options
author | Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it> | 2005-09-10 19:44:58 +0200 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2005-09-10 12:00:18 -0700 |
commit | 16b036786a6bd08cf7a91e0cd58219a6717da2a6 (patch) | |
tree | 668274402b02623a6380e507b8b7081ed373ca1a /arch | |
parent | d129f31236c241c07e583e8bc695c382365d02ce (diff) | |
download | op-kernel-dev-16b036786a6bd08cf7a91e0cd58219a6717da2a6.zip op-kernel-dev-16b036786a6bd08cf7a91e0cd58219a6717da2a6.tar.gz |
[PATCH] uml: avoid already done dirtying
The PTE returned from handle_mm_fault is already marked as dirty and accessed
if needed.
Also, since this is not set with set_pte() (which sets NEWPAGE and NEWPROT as
needed), this wouldn't work anyway.
This version has been updated and fixed, thanks to some feedback from Jeff Dike.
Signed-off-by: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/um/kernel/trap_kern.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/arch/um/kernel/trap_kern.c b/arch/um/kernel/trap_kern.c index d20361d..87cc6fd 100644 --- a/arch/um/kernel/trap_kern.c +++ b/arch/um/kernel/trap_kern.c @@ -85,8 +85,7 @@ survive: pte = pte_offset_kernel(pmd, address); } while(!pte_present(*pte)); err = 0; - *pte = pte_mkyoung(*pte); - if(pte_write(*pte)) *pte = pte_mkdirty(*pte); + WARN_ON(!pte_young(*pte) || (is_write && !pte_dirty(*pte))); flush_tlb_page(vma, address); out: up_read(&mm->mmap_sem); |