summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTed Unangst <tedu@cvs.openbsd.org>2004-06-09 22:54:15 +0000
committerTed Unangst <tedu@cvs.openbsd.org>2004-06-09 22:54:15 +0000
commitae372ca4eeb4d3eb205c0ac60b5dc8d946965d35 (patch)
tree57af6a50af67a788f78e8c0317e036ca7b13dc49
parenta3775629966bec0445340075a4869a0ea66b15f2 (diff)
in theory, vnlock should alays be NULL in the generic lock (sic) functions.
in reality, sometimes it's not. we don't trust vnlock, and since it's 100% guaranteed to panic if it gets here, just completely stop using it. crash by henning, ok deraadt
-rw-r--r--sys/kern/vfs_default.c26
1 files changed, 3 insertions, 23 deletions
diff --git a/sys/kern/vfs_default.c b/sys/kern/vfs_default.c
index d0f923ee2d3..720c3fb8dd8 100644
--- a/sys/kern/vfs_default.c
+++ b/sys/kern/vfs_default.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: vfs_default.c,v 1.24 2004/05/14 04:00:33 tedu Exp $ */
+/* $OpenBSD: vfs_default.c,v 1.25 2004/06/09 22:54:14 tedu Exp $ */
/*
* Portions of this code are:
@@ -225,18 +225,7 @@ int
vop_generic_unlock(v)
void *v;
{
- struct vop_unlock_args /* {
- struct vnodeop_desc *a_desc;
- struct vnode *a_vp;
- int a_flags;
- struct proc *a_p;
- } */ *ap = v;
-
- struct vnode *vp = ap->a_vp;
-
- if (vp->v_vnlock == NULL)
- return (0);
- return (lockmgr(vp->v_vnlock, LK_RELEASE, NULL, ap->a_p));
+ return (0);
}
/*
@@ -246,16 +235,7 @@ int
vop_generic_islocked(v)
void *v;
{
- struct vop_islocked_args /* {
- struct vnodeop_desc *a_desc;
- struct vnode *a_vp;
- } */ *ap = v;
-
- struct vnode *vp = ap->a_vp;
-
- if (vp->v_vnlock == NULL)
- return (0);
- return (lockstatus(vp->v_vnlock));
+ return (0);
}
struct filterops generic_filtops =