@@ -169,11 +169,12 @@ SYSCALL_DEFINE1(brk, unsigned long, brk)
169
169
goto out ; /* mapping intersects with an existing non-brk vma. */
170
170
/*
171
171
* mm->brk must be protected by write mmap_lock.
172
- * do_vma_munmap () will drop the lock on success, so update it
173
- * before calling do_vma_munmap().
172
+ * do_vmi_align_munmap () will drop the lock on success, so
173
+ * update it before calling do_vma_munmap().
174
174
*/
175
175
mm -> brk = brk ;
176
- if (do_vma_munmap (& vmi , brkvma , newbrk , oldbrk , & uf , true))
176
+ if (do_vmi_align_munmap (& vmi , brkvma , mm , newbrk , oldbrk , & uf ,
177
+ /* unlock = */ true))
177
178
goto out ;
178
179
179
180
goto success_unlocked ;
@@ -1479,9 +1480,9 @@ unsigned long mmap_region(struct file *file, unsigned long addr,
1479
1480
vma -> vm_file = get_file (file );
1480
1481
/*
1481
1482
* call_mmap() may map PTE, so ensure there are no existing PTEs
1482
- * call the vm_ops close function if one exists.
1483
+ * and call the vm_ops close function if one exists.
1483
1484
*/
1484
- vms_clean_up_area (& vms , & mas_detach , true );
1485
+ vms_clean_up_area (& vms , & mas_detach );
1485
1486
error = call_mmap (file , vma );
1486
1487
if (error )
1487
1488
goto unmap_and_free_vma ;
@@ -1744,28 +1745,6 @@ SYSCALL_DEFINE5(remap_file_pages, unsigned long, start, unsigned long, size,
1744
1745
return ret ;
1745
1746
}
1746
1747
1747
- /*
1748
- * do_vma_munmap() - Unmap a full or partial vma.
1749
- * @vmi: The vma iterator pointing at the vma
1750
- * @vma: The first vma to be munmapped
1751
- * @start: the start of the address to unmap
1752
- * @end: The end of the address to unmap
1753
- * @uf: The userfaultfd list_head
1754
- * @unlock: Drop the lock on success
1755
- *
1756
- * unmaps a VMA mapping when the vma iterator is already in position.
1757
- * Does not handle alignment.
1758
- *
1759
- * Return: 0 on success drops the lock of so directed, error on failure and will
1760
- * still hold the lock.
1761
- */
1762
- int do_vma_munmap (struct vma_iterator * vmi , struct vm_area_struct * vma ,
1763
- unsigned long start , unsigned long end , struct list_head * uf ,
1764
- bool unlock )
1765
- {
1766
- return do_vmi_align_munmap (vmi , vma , vma -> vm_mm , start , end , uf , unlock );
1767
- }
1768
-
1769
1748
/*
1770
1749
* do_brk_flags() - Increase the brk vma if the flags match.
1771
1750
* @vmi: The vma iterator
0 commit comments