diff options
Diffstat (limited to 'mm/mmap.c')
-rw-r--r-- | mm/mmap.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -1265,8 +1265,8 @@ out: | |||
1265 | mm->total_vm += len >> PAGE_SHIFT; | 1265 | mm->total_vm += len >> PAGE_SHIFT; |
1266 | vm_stat_account(mm, vm_flags, file, len >> PAGE_SHIFT); | 1266 | vm_stat_account(mm, vm_flags, file, len >> PAGE_SHIFT); |
1267 | if (vm_flags & VM_LOCKED) { | 1267 | if (vm_flags & VM_LOCKED) { |
1268 | long nr_pages = mlock_vma_pages_range(vma, addr, addr + len); | 1268 | if (!mlock_vma_pages_range(vma, addr, addr + len)) |
1269 | mm->locked_vm += (len >> PAGE_SHIFT) - nr_pages; | 1269 | mm->locked_vm += (len >> PAGE_SHIFT); |
1270 | } else if ((flags & MAP_POPULATE) && !(flags & MAP_NONBLOCK)) | 1270 | } else if ((flags & MAP_POPULATE) && !(flags & MAP_NONBLOCK)) |
1271 | make_pages_present(addr, addr + len); | 1271 | make_pages_present(addr, addr + len); |
1272 | return addr; | 1272 | return addr; |