]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
[PATCH] uml: avoid already done dirtying
authorPaolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
Sat, 10 Sep 2005 17:44:58 +0000 (19:44 +0200)
committerLinus Torvalds <torvalds@g5.osdl.org>
Sat, 10 Sep 2005 19:00:18 +0000 (12:00 -0700)
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>
arch/um/kernel/trap_kern.c

index d20361dcd1274f165f385a1e7d09b687e40c5689..87cc6fd76cedecd10ac110db2b2f60cd0b109fcc 100644 (file)
@@ -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);