diff --git a/sys/vm/vm_mmap.c b/sys/vm/vm_mmap.c index d331a9b22a27..8118c0ae2fed 100644 --- a/sys/vm/vm_mmap.c +++ b/sys/vm/vm_mmap.c @@ -312,14 +312,12 @@ sys_mmap(td, uap) * There should really be a pmap call to determine a reasonable * location. */ - PROC_LOCK(td->td_proc); if (addr == 0 || (addr >= round_page((vm_offset_t)vms->vm_taddr) && addr < round_page((vm_offset_t)vms->vm_daddr + - lim_max_proc(td->td_proc, RLIMIT_DATA)))) + lim_max(td, RLIMIT_DATA)))) addr = round_page((vm_offset_t)vms->vm_daddr + - lim_max_proc(td->td_proc, RLIMIT_DATA)); - PROC_UNLOCK(td->td_proc); + lim_max(td, RLIMIT_DATA)); } if (size == 0) { /*