X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=blobdiff_plain;ds=sidebyside;f=mm%2Fmprotect.c;h=4de546899dc140d139f218fc53ff0c358c6c5a42;hb=30472908d50cf726a68c2b444127a1dafae8a91c;hp=e8346c30abecaef6c7e06d83c33922ac54883077;hpb=f745bb1c73e2395e6b9961d4d915a8f8e2cd32cd;p=linux-2.6 diff --git a/mm/mprotect.c b/mm/mprotect.c index e8346c30ab..4de546899d 100644 --- a/mm/mprotect.c +++ b/mm/mprotect.c @@ -53,7 +53,6 @@ static void change_pte_range(struct mm_struct *mm, pmd_t *pmd, if (dirty_accountable && pte_dirty(ptent)) ptent = pte_mkwrite(ptent); set_pte_at(mm, addr, pte, ptent); - lazy_mmu_prot_update(ptent); #ifdef CONFIG_MIGRATION } else if (!pte_file(oldpte)) { swp_entry_t entry = pte_to_swp_entry(oldpte); @@ -193,11 +192,9 @@ success: * held in write mode. */ vma->vm_flags = newflags; - vma->vm_page_prot = protection_map[newflags & - (VM_READ|VM_WRITE|VM_EXEC|VM_SHARED)]; + vma->vm_page_prot = vm_get_page_prot(newflags); if (vma_wants_writenotify(vma)) { - vma->vm_page_prot = protection_map[newflags & - (VM_READ|VM_WRITE|VM_EXEC)]; + vma->vm_page_prot = vm_get_page_prot(newflags & ~VM_SHARED); dirty_accountable = 1; }