diff options
author | Artur Grabowski <art@cvs.openbsd.org> | 2001-12-04 23:22:43 +0000 |
---|---|---|
committer | Artur Grabowski <art@cvs.openbsd.org> | 2001-12-04 23:22:43 +0000 |
commit | 2d6ebc6b1044ef771b2b25c09c2abffe0c0a0d3d (patch) | |
tree | f85c4269fcfa3a0ec1575186dfcbcbbb1ebaf8d7 /sys/uvm/uvm_mmap.c | |
parent | f1bec1965343db9a80a80e7ed55ee2fe5dd36253 (diff) |
Yet another sync to NetBSD uvm.
Today we add a pmap argument to pmap_update() and allocate map entries for
kernel_map from kmem_map instead of using the static entries. This should
get rid of MAX_KMAPENT panics. Also some uvm_loan problems are fixed.
Diffstat (limited to 'sys/uvm/uvm_mmap.c')
-rw-r--r-- | sys/uvm/uvm_mmap.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/sys/uvm/uvm_mmap.c b/sys/uvm/uvm_mmap.c index 1543303d5aa..05c786f6666 100644 --- a/sys/uvm/uvm_mmap.c +++ b/sys/uvm/uvm_mmap.c @@ -1,5 +1,5 @@ -/* $OpenBSD: uvm_mmap.c,v 1.30 2001/11/28 19:28:15 art Exp $ */ -/* $NetBSD: uvm_mmap.c,v 1.54 2001/06/14 20:32:49 thorpej Exp $ */ +/* $OpenBSD: uvm_mmap.c,v 1.31 2001/12/04 23:22:42 art Exp $ */ +/* $NetBSD: uvm_mmap.c,v 1.55 2001/08/17 05:52:46 chs Exp $ */ /* * Copyright (c) 1997 Charles D. Cranor and Washington University. @@ -1063,6 +1063,11 @@ uvm_mmap(map, addr, size, prot, maxprot, flags, handle, foff, locklimit) } else { vp = (struct vnode *)handle; if (vp->v_type != VCHR) { + error = VOP_MMAP(vp, 0, curproc->p_ucred, curproc); + if (error) { + return error; + } + uobj = uvn_attach((void *)vp, (flags & MAP_SHARED) ? maxprot : (maxprot & ~VM_PROT_WRITE)); |