Eliminate the use of Giant from ia64-specific code in freebsd32_mmap().

This commit is contained in:
alc 2007-05-01 17:10:01 +00:00
parent a9656f2df2
commit d11e79c795

View File

@ -407,7 +407,6 @@ freebsd32_mmap(struct thread *td, struct freebsd32_mmap_args *uap)
start = addr;
end = addr + len;
mtx_lock(&Giant);
if (start != trunc_page(start)) {
error = freebsd32_mmap_partial(td, start,
round_page(start), prot,
@ -438,14 +437,11 @@ freebsd32_mmap(struct thread *td, struct freebsd32_mmap_args *uap)
prot |= VM_PROT_WRITE;
map = &td->td_proc->p_vmspace->vm_map;
rv = vm_map_remove(map, start, end);
if (rv != KERN_SUCCESS) {
mtx_unlock(&Giant);
if (rv != KERN_SUCCESS)
return (EINVAL);
}
rv = vm_map_find(map, 0, 0,
&start, end - start, FALSE,
prot, VM_PROT_ALL, 0);
mtx_unlock(&Giant);
if (rv != KERN_SUCCESS)
return (EINVAL);
r.fd = fd;
@ -459,7 +455,6 @@ freebsd32_mmap(struct thread *td, struct freebsd32_mmap_args *uap)
td->td_retval[0] = addr;
return (0);
}
mtx_unlock(&Giant);
if (end == start) {
/*
* After dealing with the ragged ends, there