diff options
-rw-r--r-- | mm/mmap.c | 4 |
1 files changed, 1 insertions, 3 deletions
@@ -963,11 +963,9 @@ unsigned long do_mmap_pgoff(struct file *file, unsigned long addr, | |||
963 | vm_flags = calc_vm_prot_bits(prot) | calc_vm_flag_bits(flags) | | 963 | vm_flags = calc_vm_prot_bits(prot) | calc_vm_flag_bits(flags) | |
964 | mm->def_flags | VM_MAYREAD | VM_MAYWRITE | VM_MAYEXEC; | 964 | mm->def_flags | VM_MAYREAD | VM_MAYWRITE | VM_MAYEXEC; |
965 | 965 | ||
966 | if (flags & MAP_LOCKED) { | 966 | if (flags & MAP_LOCKED) |
967 | if (!can_do_mlock()) | 967 | if (!can_do_mlock()) |
968 | return -EPERM; | 968 | return -EPERM; |
969 | vm_flags |= VM_LOCKED; | ||
970 | } | ||
971 | 969 | ||
972 | /* mlock MCL_FUTURE? */ | 970 | /* mlock MCL_FUTURE? */ |
973 | if (vm_flags & VM_LOCKED) { | 971 | if (vm_flags & VM_LOCKED) { |