summaryrefslogtreecommitdiffstats
path: root/mm/mremap.c
diff options
context:
space:
mode:
Diffstat (limited to 'mm/mremap.c')
-rw-r--r--mm/mremap.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/mm/mremap.c b/mm/mremap.c
index 764cfabb8..bdbcf4841 100644
--- a/mm/mremap.c
+++ b/mm/mremap.c
@@ -144,9 +144,9 @@ static inline unsigned long move_vma(struct vm_area_struct * vma,
lock_vma_mappings(vma);
spin_lock(&current->mm->page_table_lock);
__insert_vm_struct(current->mm, new_vma);
+ unlock_vma_mappings(vma);
merge_segments(current->mm, new_vma->vm_start, new_vma->vm_end);
spin_unlock(&current->mm->page_table_lock);
- unlock_vma_mappings(vma);
do_munmap(current->mm, addr, old_len);
current->mm->total_vm += new_len >> PAGE_SHIFT;
if (new_vma->vm_flags & VM_LOCKED) {