Now we removed the merge logic from __mmap_new_file_vma() we can simply pass in the vma direct rather than a pointer to a VMA, as pointed out by Vlastimil. --- mm/vma.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/mm/vma.c b/mm/vma.c index f22ffb772fe1..68138e8c153e 100644 --- a/mm/vma.c +++ b/mm/vma.c @@ -2278,10 +2278,9 @@ static int __mmap_prepare(struct mmap_state *map, struct list_head *uf) static int __mmap_new_file_vma(struct mmap_state *map, - struct vm_area_struct **vmap) + struct vm_area_struct *vma) { struct vma_iterator *vmi = map->vmi; - struct vm_area_struct *vma = *vmap; int error; vma->vm_file = get_file(map->file); @@ -2349,7 +2348,7 @@ static int __mmap_new_vma(struct mmap_state *map, struct vm_area_struct **vmap) } if (map->file) - error = __mmap_new_file_vma(map, &vma); + error = __mmap_new_file_vma(map, vma); else if (map->flags & VM_SHARED) error = shmem_zero_setup(vma); else -- 2.47.0