mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 11:11:45 -04:00
setup vma->vm_page_prot by vm_get_page_prot()
This patch uses vm_get_page_prot() to setup vma->vm_page_prot. Though inside vm_get_page_prot() the protection flags is AND with (VM_READ|VM_WRITE|VM_EXEC|VM_SHARED), it does not hurt correct code. Signed-off-by: Coly Li <[email protected]> Cc: Hugh Dickins <[email protected]> Cc: Tony Luck <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
This commit is contained in:
parent
1c7037db50
commit
3ed75eb8f1
4 changed files with 8 additions and 13 deletions
|
|
@ -192,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);
|
||||
dirty_accountable = 1;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue