diff options
Diffstat (limited to 'sys/kern/vfs_vnops.c')
-rw-r--r-- | sys/kern/vfs_vnops.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/sys/kern/vfs_vnops.c b/sys/kern/vfs_vnops.c index 8b7ff95a94a..402af724722 100644 --- a/sys/kern/vfs_vnops.c +++ b/sys/kern/vfs_vnops.c @@ -1,4 +1,4 @@ -/* $OpenBSD: vfs_vnops.c,v 1.19 1998/12/05 17:16:54 csapuntz Exp $ */ +/* $OpenBSD: vfs_vnops.c,v 1.20 1999/02/26 04:51:17 art Exp $ */ /* $NetBSD: vfs_vnops.c,v 1.20 1996/02/04 02:18:41 christos Exp $ */ /* @@ -56,6 +56,10 @@ #include <vm/vm.h> +#if defined(UVM) +#include <uvm/uvm_extern.h> +#endif + struct fileops vnops = { vn_read, vn_write, vn_ioctl, vn_select, vn_closefile }; @@ -191,8 +195,13 @@ vn_writechk(vp) * the vnode, try to free it up once. If * we fail, we can't allow writing. */ +#if defined(UVM) + if ((vp->v_flag & VTEXT) && !uvm_vnp_uncache(vp)) + return (ETXTBSY); +#else if ((vp->v_flag & VTEXT) && !vnode_pager_uncache(vp)) return (ETXTBSY); +#endif return (0); } |