summaryrefslogtreecommitdiff
path: root/sys/nfs/nfs_serv.c
diff options
context:
space:
mode:
authorArtur Grabowski <art@cvs.openbsd.org>2001-12-19 08:58:08 +0000
committerArtur Grabowski <art@cvs.openbsd.org>2001-12-19 08:58:08 +0000
commitd8afae924f4db99650aa0df115c6ae66ed02b950 (patch)
treea2cbc045f0eb624a394f8e45fea1a58ecf1faaf0 /sys/nfs/nfs_serv.c
parent4a6c79ff4f05aaae32458104529a9a9e0d3d208b (diff)
UBC was a disaster. It worked very good when it worked, but on some
machines or some configurations or in some phase of the moon (we actually don't know when or why) files disappeared. Since we've not been able to track down the problem in two weeks intense debugging and we need -current to be stable, back out everything to a state it had before UBC. We apologise for the inconvenience.
Diffstat (limited to 'sys/nfs/nfs_serv.c')
-rw-r--r--sys/nfs/nfs_serv.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/sys/nfs/nfs_serv.c b/sys/nfs/nfs_serv.c
index 9534e7221da..a66f457ceeb 100644
--- a/sys/nfs/nfs_serv.c
+++ b/sys/nfs/nfs_serv.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: nfs_serv.c,v 1.28 2001/11/27 05:27:12 art Exp $ */
+/* $OpenBSD: nfs_serv.c,v 1.29 2001/12/19 08:58:06 art Exp $ */
/* $NetBSD: nfs_serv.c,v 1.34 1997/05/12 23:37:12 fvdl Exp $ */
/*
@@ -1663,6 +1663,8 @@ nfsrv_remove(nfsd, slp, procp, mrq)
error = EBUSY;
goto out;
}
+ if (vp->v_flag & VTEXT)
+ uvm_vnp_uncache(vp);
out:
if (!error) {
error = VOP_REMOVE(nd.ni_dvp, nd.ni_vp, &nd.ni_cnd);
@@ -3274,10 +3276,11 @@ nfsrv_access(vp, flags, cred, rdonly, p, override)
}
}
/*
- * If the vnode is in use as a process's text,
- * we can't allow writing.
+ * If there's shared text associated with
+ * the inode, try to free it up once. If
+ * we fail, we can't allow writing.
*/
- if ((vp->v_flag & VTEXT))
+ if ((vp->v_flag & VTEXT) && !uvm_vnp_uncache(vp))
return (ETXTBSY);
}
error = VOP_ACCESS(vp, flags, cred, p);