diff options
Diffstat (limited to 'mm/mlock.c')
-rw-r--r-- | mm/mlock.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/mm/mlock.c b/mm/mlock.c index 1c5e33fce639..79b7cf7d1bca 100644 --- a/mm/mlock.c +++ b/mm/mlock.c | |||
@@ -358,7 +358,7 @@ static int do_mlock(unsigned long start, size_t len, int on) | |||
358 | 358 | ||
359 | newflags = vma->vm_flags & ~VM_LOCKED; | 359 | newflags = vma->vm_flags & ~VM_LOCKED; |
360 | if (on) | 360 | if (on) |
361 | newflags |= VM_LOCKED | VM_POPULATE; | 361 | newflags |= VM_LOCKED; |
362 | 362 | ||
363 | tmp = vma->vm_end; | 363 | tmp = vma->vm_end; |
364 | if (tmp > end) | 364 | if (tmp > end) |
@@ -418,8 +418,7 @@ int __mm_populate(unsigned long start, unsigned long len, int ignore_errors) | |||
418 | * range with the first VMA. Also, skip undesirable VMA types. | 418 | * range with the first VMA. Also, skip undesirable VMA types. |
419 | */ | 419 | */ |
420 | nend = min(end, vma->vm_end); | 420 | nend = min(end, vma->vm_end); |
421 | if ((vma->vm_flags & (VM_IO | VM_PFNMAP | VM_POPULATE)) != | 421 | if (vma->vm_flags & (VM_IO | VM_PFNMAP)) |
422 | VM_POPULATE) | ||
423 | continue; | 422 | continue; |
424 | if (nstart < vma->vm_start) | 423 | if (nstart < vma->vm_start) |
425 | nstart = vma->vm_start; | 424 | nstart = vma->vm_start; |
@@ -492,9 +491,9 @@ static int do_mlockall(int flags) | |||
492 | struct vm_area_struct * vma, * prev = NULL; | 491 | struct vm_area_struct * vma, * prev = NULL; |
493 | 492 | ||
494 | if (flags & MCL_FUTURE) | 493 | if (flags & MCL_FUTURE) |
495 | current->mm->def_flags |= VM_LOCKED | VM_POPULATE; | 494 | current->mm->def_flags |= VM_LOCKED; |
496 | else | 495 | else |
497 | current->mm->def_flags &= ~(VM_LOCKED | VM_POPULATE); | 496 | current->mm->def_flags &= ~VM_LOCKED; |
498 | if (flags == MCL_FUTURE) | 497 | if (flags == MCL_FUTURE) |
499 | goto out; | 498 | goto out; |
500 | 499 | ||
@@ -503,7 +502,7 @@ static int do_mlockall(int flags) | |||
503 | 502 | ||
504 | newflags = vma->vm_flags & ~VM_LOCKED; | 503 | newflags = vma->vm_flags & ~VM_LOCKED; |
505 | if (flags & MCL_CURRENT) | 504 | if (flags & MCL_CURRENT) |
506 | newflags |= VM_LOCKED | VM_POPULATE; | 505 | newflags |= VM_LOCKED; |
507 | 506 | ||
508 | /* Ignore errors */ | 507 | /* Ignore errors */ |
509 | mlock_fixup(vma, &prev, vma->vm_start, vma->vm_end, newflags); | 508 | mlock_fixup(vma, &prev, vma->vm_start, vma->vm_end, newflags); |