summaryrefslogtreecommitdiffstats
path: root/sys/kern/vfs_default.c
diff options
context:
space:
mode:
authorpedro <pedro@openbsd.org>2005-10-19 16:50:46 +0000
committerpedro <pedro@openbsd.org>2005-10-19 16:50:46 +0000
commit8a742fca796d50a45f48b4d62485ee48c312f780 (patch)
tree500b8df7b0dc16c95f47467d8b47ebdcecb8b082 /sys/kern/vfs_default.c
parent.Xr rcsmerge(1) + one style nitpick; (diff)
downloadwireguard-openbsd-8a742fca796d50a45f48b4d62485ee48c312f780.tar.xz
wireguard-openbsd-8a742fca796d50a45f48b4d62485ee48c312f780.zip
Remove v_vnlock from struct vnode, okay krw@ tedu@
Diffstat (limited to 'sys/kern/vfs_default.c')
-rw-r--r--sys/kern/vfs_default.c48
1 files changed, 1 insertions, 47 deletions
diff --git a/sys/kern/vfs_default.c b/sys/kern/vfs_default.c
index 68e7d423ace..7ce1ca9530a 100644
--- a/sys/kern/vfs_default.c
+++ b/sys/kern/vfs_default.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: vfs_default.c,v 1.26 2005/07/03 20:13:59 drahn Exp $ */
+/* $OpenBSD: vfs_default.c,v 1.27 2005/10/19 16:50:46 pedro Exp $ */
/*
* Portions of this code are:
@@ -162,51 +162,6 @@ vop_generic_lock(v)
struct proc *a_p;
} */ *ap = v;
-#ifdef notyet
- /*
- * This code cannot be used until all the non-locking filesystems
- * (notably NFS) are converted to properly lock and release nodes.
- * Also, certain vnode operations change the locking state within
- * the operation (create, mknod, remove, link, rename, mkdir, rmdir,
- * and symlink). Ideally these operations should not change the
- * lock state, but should be changed to let the caller of the
- * function unlock them. Otherwise all intermediate vnode layers
- * (such as union, umapfs, etc) must catch these functions to do
- * the necessary locking at their layer. Note that the inactive
- * and lookup operations also change their lock state, but this
- * cannot be avoided, so these two operations will always need
- * to be handled in intermediate layers.
- */
- struct vnode *vp = ap->a_vp;
- int vnflags, flags = ap->a_flags;
-
- if (vp->v_vnlock == NULL) {
- if ((flags & LK_TYPE_MASK) == LK_DRAIN)
- return (0);
- MALLOC(vp->v_vnlock, struct lock *, sizeof(struct lock),
- M_VNODE, M_WAITOK);
- lockinit(vp->v_vnlock, PVFS, "vnlock", 0, 0);
- }
- switch (flags & LK_TYPE_MASK) {
- case LK_DRAIN:
- vnflags = LK_DRAIN;
- break;
- case LK_EXCLUSIVE:
- case LK_SHARED:
- vnflags = LK_SHARED;
- break;
- case LK_UPGRADE:
- case LK_EXCLUPGRADE:
- case LK_DOWNGRADE:
- return (0);
- case LK_RELEASE:
- default:
- panic("vop_generic_lock: bad operation %d", flags & LK_TYPE_MASK);
- }
- if (flags & LK_INTERLOCK)
- vnflags |= LK_INTERLOCK;
- return(lockmgr(vp->v_vnlock, vnflags, &vp->v_interlock, ap->a_p));
-#else /* for now */
/*
* Since we are not using the lock manager, we must clear
* the interlock here.
@@ -214,7 +169,6 @@ vop_generic_lock(v)
if (ap->a_flags & LK_INTERLOCK)
simple_unlock(&ap->a_vp->v_interlock);
return (0);
-#endif
}
/*