diff options
-rw-r--r-- | fs/proc/task_mmu.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/fs/proc/task_mmu.c b/fs/proc/task_mmu.c index 288185e24762..ef44bb474ea2 100644 --- a/fs/proc/task_mmu.c +++ b/fs/proc/task_mmu.c | |||
@@ -792,19 +792,20 @@ static inline void clear_soft_dirty(struct vm_area_struct *vma, | |||
792 | pte_t ptent = *pte; | 792 | pte_t ptent = *pte; |
793 | 793 | ||
794 | if (pte_present(ptent)) { | 794 | if (pte_present(ptent)) { |
795 | ptent = ptep_modify_prot_start(vma->vm_mm, addr, pte); | ||
795 | ptent = pte_wrprotect(ptent); | 796 | ptent = pte_wrprotect(ptent); |
796 | ptent = pte_clear_soft_dirty(ptent); | 797 | ptent = pte_clear_soft_dirty(ptent); |
798 | ptep_modify_prot_commit(vma->vm_mm, addr, pte, ptent); | ||
797 | } else if (is_swap_pte(ptent)) { | 799 | } else if (is_swap_pte(ptent)) { |
798 | ptent = pte_swp_clear_soft_dirty(ptent); | 800 | ptent = pte_swp_clear_soft_dirty(ptent); |
801 | set_pte_at(vma->vm_mm, addr, pte, ptent); | ||
799 | } | 802 | } |
800 | |||
801 | set_pte_at(vma->vm_mm, addr, pte, ptent); | ||
802 | } | 803 | } |
803 | 804 | ||
804 | static inline void clear_soft_dirty_pmd(struct vm_area_struct *vma, | 805 | static inline void clear_soft_dirty_pmd(struct vm_area_struct *vma, |
805 | unsigned long addr, pmd_t *pmdp) | 806 | unsigned long addr, pmd_t *pmdp) |
806 | { | 807 | { |
807 | pmd_t pmd = *pmdp; | 808 | pmd_t pmd = pmdp_huge_get_and_clear(vma->vm_mm, addr, pmdp); |
808 | 809 | ||
809 | pmd = pmd_wrprotect(pmd); | 810 | pmd = pmd_wrprotect(pmd); |
810 | pmd = pmd_clear_soft_dirty(pmd); | 811 | pmd = pmd_clear_soft_dirty(pmd); |