Merge to Fedora kernel-2.6.7-1.441
[linux-2.6.git] / include / asm-ia64 / pgtable.h
index 590432c..8d727c6 100644 (file)
@@ -346,6 +346,8 @@ static inline int
 ptep_test_and_clear_young (pte_t *ptep)
 {
 #ifdef CONFIG_SMP
+       if (!pte_young(*ptep))
+               return 0;
        return test_and_clear_bit(_PAGE_A_BIT, ptep);
 #else
        pte_t pte = *ptep;
@@ -360,6 +362,8 @@ static inline int
 ptep_test_and_clear_dirty (pte_t *ptep)
 {
 #ifdef CONFIG_SMP
+       if (!pte_dirty(*ptep))
+               return 0;
        return test_and_clear_bit(_PAGE_D_BIT, ptep);
 #else
        pte_t pte = *ptep;