diff options
Diffstat (limited to 'mm/mlock.c')
-rw-r--r-- | mm/mlock.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/mm/mlock.c b/mm/mlock.c index f0b9ce572fc7..c9bd528b01d2 100644 --- a/mm/mlock.c +++ b/mm/mlock.c | |||
@@ -517,11 +517,11 @@ SYSCALL_DEFINE2(munlock, unsigned long, start, size_t, len) | |||
517 | static int do_mlockall(int flags) | 517 | static int do_mlockall(int flags) |
518 | { | 518 | { |
519 | struct vm_area_struct * vma, * prev = NULL; | 519 | struct vm_area_struct * vma, * prev = NULL; |
520 | unsigned int def_flags = 0; | ||
521 | 520 | ||
522 | if (flags & MCL_FUTURE) | 521 | if (flags & MCL_FUTURE) |
523 | def_flags = VM_LOCKED; | 522 | current->mm->def_flags |= VM_LOCKED; |
524 | current->mm->def_flags = def_flags; | 523 | else |
524 | current->mm->def_flags &= ~VM_LOCKED; | ||
525 | if (flags == MCL_FUTURE) | 525 | if (flags == MCL_FUTURE) |
526 | goto out; | 526 | goto out; |
527 | 527 | ||