summaryrefslogtreecommitdiff
path: root/sys/kern
diff options
context:
space:
mode:
authorPedro Martelletto <pedro@cvs.openbsd.org>2005-10-19 16:50:48 +0000
committerPedro Martelletto <pedro@cvs.openbsd.org>2005-10-19 16:50:48 +0000
commit67ecac5c32f8d5701f4e5af0b178836e51590d19 (patch)
tree3cbb7b639642e62bdbd6dd3f5f4a51f399ce09e1 /sys/kern
parent546d68c18c4721a4fc0812741bf80e0e4b8cd421 (diff)
Remove v_vnlock from struct vnode, okay krw@ tedu@
Diffstat (limited to 'sys/kern')
-rw-r--r--sys/kern/vfs_default.c48
-rw-r--r--sys/kern/vfs_subr.c4
-rw-r--r--sys/kern/vfs_sync.c12
3 files changed, 4 insertions, 60 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
}
/*
diff --git a/sys/kern/vfs_subr.c b/sys/kern/vfs_subr.c
index f2b525efde0..23d9ad18655 100644
--- a/sys/kern/vfs_subr.c
+++ b/sys/kern/vfs_subr.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: vfs_subr.c,v 1.114 2005/05/26 00:33:45 pedro Exp $ */
+/* $OpenBSD: vfs_subr.c,v 1.115 2005/10/19 16:50:46 pedro Exp $ */
/* $NetBSD: vfs_subr.c,v 1.53 1996/04/22 01:39:13 christos Exp $ */
/*
@@ -456,7 +456,6 @@ getnewvnode(tag, mp, vops, vpp)
}
vp->v_type = VNON;
cache_purge(vp);
- vp->v_vnlock = NULL;
vp->v_tag = tag;
vp->v_op = vops;
insmntque(vp, mp);
@@ -634,7 +633,6 @@ loop:
VOP_UNLOCK(vp, 0, p);
simple_lock(&vp->v_interlock);
vclean(vp, 0, p);
- vp->v_vnlock = NULL;
vp->v_op = nvp->v_op;
vp->v_tag = nvp->v_tag;
nvp->v_type = VNON;
diff --git a/sys/kern/vfs_sync.c b/sys/kern/vfs_sync.c
index 25727327cfc..dbdd4183343 100644
--- a/sys/kern/vfs_sync.c
+++ b/sys/kern/vfs_sync.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: vfs_sync.c,v 1.33 2005/10/04 22:31:44 pedro Exp $ */
+/* $OpenBSD: vfs_sync.c,v 1.34 2005/10/19 16:50:46 pedro Exp $ */
/*
* Portions of this code are:
@@ -416,15 +416,7 @@ sync_print(v)
void *v;
{
- struct vop_print_args /* {
- struct vnodeop_desc *a_desc;
- struct vnode *a_vp;
- } */ *ap = v;
- struct vnode *vp = ap->a_vp;
+ printf("syncer vnode\n");
- printf("syncer vnode");
- if (vp->v_vnlock != NULL)
- lockmgr_printinfo(vp->v_vnlock);
- printf("\n");
return (0);
}