diff options
author | Artur Grabowski <art@cvs.openbsd.org> | 1999-02-26 05:17:44 +0000 |
---|---|---|
committer | Artur Grabowski <art@cvs.openbsd.org> | 1999-02-26 05:17:44 +0000 |
commit | 4acd8583efbbec3d6c1070dfad2ba0729cbf7888 (patch) | |
tree | 706041d1893a9e44660caf45d16dbff88851b202 | |
parent | edaa202c93517022a2282c5bbef59c502898d0ec (diff) |
adapt to uvm vnode pager
-rw-r--r-- | sys/kern/vfs_subr.c | 19 |
1 files changed, 16 insertions, 3 deletions
diff --git a/sys/kern/vfs_subr.c b/sys/kern/vfs_subr.c index f084e71fc2f..4b5c24997d1 100644 --- a/sys/kern/vfs_subr.c +++ b/sys/kern/vfs_subr.c @@ -1,4 +1,4 @@ -/* $OpenBSD: vfs_subr.c,v 1.31 1999/02/19 17:15:45 art Exp $ */ +/* $OpenBSD: vfs_subr.c,v 1.32 1999/02/26 05:17:43 art Exp $ */ /* $NetBSD: vfs_subr.c,v 1.53 1996/04/22 01:39:13 christos Exp $ */ /* @@ -68,6 +68,10 @@ #include <miscfs/specfs/specdev.h> +#if defined(UVM) +#include <uvm/uvm_extern.h> +#endif + enum vtype iftovt_tab[16] = { VNON, VFIFO, VCHR, VNON, VDIR, VNON, VBLK, VNON, VREG, VNON, VLNK, VNON, VSOCK, VNON, VNON, VBAD, @@ -457,6 +461,9 @@ getnewvnode(tag, mp, vops, vpp) *vpp = vp; vp->v_usecount = 1; vp->v_data = 0; +#ifdef UVM + simple_lock_init(&vp->v_uvm.u_obj.vmobjlock); +#endif return (0); } @@ -981,8 +988,12 @@ vclean(vp, flags, p) if (vp->v_flag & VXLOCK) panic("vclean: deadlock"); vp->v_flag |= VXLOCK; - - +#ifdef UVM + /* + * clean out any VM data associated with the vnode. + */ + uvm_vnp_terminate(vp); +#endif /* * Even if the count is zero, the VOP_INACTIVE routine may still * have the object locked while it cleans it out. The VOP_LOCK @@ -1726,7 +1737,9 @@ vfs_shutdown() if (panicstr == 0) { /* Release inodes held by texts before update. */ +#if !defined(UVM) vnode_pager_umount(NULL); +#endif #ifdef notdef vnshutdown(); #endif |