diff options
Diffstat (limited to 'mm/mprotect.c')
-rw-r--r-- | mm/mprotect.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/mm/mprotect.c b/mm/mprotect.c index 1d4d69790e59..55227845abbe 100644 --- a/mm/mprotect.c +++ b/mm/mprotect.c | |||
@@ -192,11 +192,9 @@ success: | |||
192 | * held in write mode. | 192 | * held in write mode. |
193 | */ | 193 | */ |
194 | vma->vm_flags = newflags; | 194 | vma->vm_flags = newflags; |
195 | vma->vm_page_prot = protection_map[newflags & | 195 | vma->vm_page_prot = vm_get_page_prot(newflags); |
196 | (VM_READ|VM_WRITE|VM_EXEC|VM_SHARED)]; | ||
197 | if (vma_wants_writenotify(vma)) { | 196 | if (vma_wants_writenotify(vma)) { |
198 | vma->vm_page_prot = protection_map[newflags & | 197 | vma->vm_page_prot = vm_get_page_prot(newflags); |
199 | (VM_READ|VM_WRITE|VM_EXEC)]; | ||
200 | dirty_accountable = 1; | 198 | dirty_accountable = 1; |
201 | } | 199 | } |
202 | 200 | ||