Lines Matching refs:new_len
130 unsigned long addr, unsigned long old_len, unsigned long new_len, in move_vma() argument
143 prev->vm_end = new_addr + new_len; in move_vma()
157 } else if (next->vm_start == new_addr + new_len && in move_vma()
169 prev->vm_end = new_addr + new_len; in move_vma()
189 new_vma->vm_end = new_addr+new_len; in move_vma()
202 current->mm->total_vm += new_len >> PAGE_SHIFT; in move_vma()
204 current->mm->locked_vm += new_len >> PAGE_SHIFT; in move_vma()
205 if (new_len > old_len) in move_vma()
207 new_addr + new_len); in move_vma()
225 unsigned long old_len, unsigned long new_len, in do_mremap() argument
238 new_len = PAGE_ALIGN(new_len); in do_mremap()
253 if (new_len > TASK_SIZE || new_addr > TASK_SIZE - new_len) in do_mremap()
264 if (unlikely(!new_len && new_addr != addr)) in do_mremap()
270 if ((new_addr <= addr) && (new_addr+new_len) > addr) in do_mremap()
282 ret = do_munmap(current->mm, new_addr, new_len); in do_mremap()
283 if (ret && new_len) in do_mremap()
291 if (old_len >= new_len) { in do_mremap()
292 ret = do_munmap(current->mm, addr+new_len, old_len - new_len); in do_mremap()
293 if (ret && old_len != new_len) in do_mremap()
311 if (new_len > old_len) in do_mremap()
316 locked += new_len - old_len; in do_mremap()
322 if ((current->mm->total_vm << PAGE_SHIFT) + (new_len - old_len) in do_mremap()
328 !vm_enough_memory((new_len - old_len) >> PAGE_SHIFT)) in do_mremap()
336 (old_len != new_len || !(flags & MREMAP_MAYMOVE))) { in do_mremap()
341 if (max_addr - addr >= new_len) { in do_mremap()
342 int pages = (new_len - old_len) >> PAGE_SHIFT; in do_mremap()
344 vma->vm_end = addr + new_len; in do_mremap()
350 addr + new_len); in do_mremap()
368 new_addr = get_unmapped_area(vma->vm_file, 0, new_len, vma->vm_pgoff, map_flags); in do_mremap()
373 ret = move_vma(vma, addr, old_len, new_len, new_addr); in do_mremap()
380 unsigned long old_len, unsigned long new_len, in sys_mremap() argument
386 ret = do_mremap(addr, old_len, new_len, flags, new_addr); in sys_mremap()