From 3ed75eb8f1cd89565966599c4f77d2edb086d5b0 Mon Sep 17 00:00:00 2001 From: Coly Li Date: Thu, 18 Oct 2007 23:39:15 -0700 Subject: 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 Cc: Hugh Dickins Cc: Tony Luck Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- arch/ia64/mm/init.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'arch/ia64/mm/init.c') diff --git a/arch/ia64/mm/init.c b/arch/ia64/mm/init.c index 3e10152abbf..c6c19bf11be 100644 --- a/arch/ia64/mm/init.c +++ b/arch/ia64/mm/init.c @@ -127,8 +127,8 @@ ia64_init_addr_space (void) vma->vm_mm = current->mm; vma->vm_start = current->thread.rbs_bot & PAGE_MASK; vma->vm_end = vma->vm_start + PAGE_SIZE; - vma->vm_page_prot = protection_map[VM_DATA_DEFAULT_FLAGS & 0x7]; vma->vm_flags = VM_DATA_DEFAULT_FLAGS|VM_GROWSUP|VM_ACCOUNT; + vma->vm_page_prot = vm_get_page_prot(vma->vm_flags); down_write(¤t->mm->mmap_sem); if (insert_vm_struct(current->mm, vma)) { up_write(¤t->mm->mmap_sem); -- cgit v1.2.3