Index: fs/umapfs/umap_vnops.c =================================================================== RCS file: /home/ncvs/src/sys/fs/umapfs/umap_vnops.c,v retrieving revision 1.38 diff -u -r1.38 umap_vnops.c --- fs/umapfs/umap_vnops.c 3 Mar 2003 19:15:39 -0000 1.38 +++ fs/umapfs/umap_vnops.c 29 Mar 2004 21:57:46 -0000 @@ -363,7 +363,13 @@ } */ *ap; { - vop_nolock(ap); + /* + * Since we are not using the lock manager, we must clear + * the interlock here. + * XXX we probably need to clone null_lock here. + */ + if (ap->a_flags & LK_INTERLOCK) + VI_UNLOCK(ap->a_vp); if ((ap->a_flags & LK_TYPE_MASK) == LK_DRAIN) return (0); ap->a_flags &= ~LK_INTERLOCK; @@ -383,7 +389,13 @@ struct thread *a_td; } */ *ap; { - vop_nounlock(ap); + /* + * Since we are not using the lock manager, we must clear + * the interlock here. + * XXX we probably need to clone null_unlock here. + */ + if (ap->a_flags & LK_INTERLOCK) + VI_UNLOCK(ap->a_vp); ap->a_flags &= ~LK_INTERLOCK; return (null_bypass((struct vop_generic_args *)ap)); } Index: kern/vfs_default.c =================================================================== RCS file: /home/ncvs/src/sys/kern/vfs_default.c,v retrieving revision 1.91 diff -u -r1.91 vfs_default.c --- kern/vfs_default.c 5 Nov 2003 04:30:07 -0000 1.91 +++ kern/vfs_default.c 29 Mar 2004 21:57:46 -0000 @@ -369,166 +369,6 @@ } /* - * Stubs to use when there is no locking to be done on the underlying object. - * A minimal shared lock is necessary to ensure that the underlying object - * is not revoked while an operation is in progress. So, an active shared - * count is maintained in an auxillary vnode lock structure. - */ -int -vop_sharedlock(ap) - struct vop_lock_args /* { - struct vnode *a_vp; - int a_flags; - struct thread *a_td; - } */ *ap; -{ - /* - * 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; - - switch (flags & LK_TYPE_MASK) { - case LK_DRAIN: - vnflags = LK_DRAIN; - break; - case LK_EXCLUSIVE: -#ifdef DEBUG_VFS_LOCKS - /* - * Normally, we use shared locks here, but that confuses - * the locking assertions. - */ - vnflags = LK_EXCLUSIVE; - break; -#endif - case LK_SHARED: - vnflags = LK_SHARED; - break; - case LK_UPGRADE: - case LK_EXCLUPGRADE: - case LK_DOWNGRADE: - return (0); - case LK_RELEASE: - default: - panic("vop_sharedlock: bad operation %d", flags & LK_TYPE_MASK); - } - vnflags |= flags & (LK_INTERLOCK | LK_EXTFLG_MASK); -#ifndef DEBUG_LOCKS - return (lockmgr(vp->v_vnlock, vnflags, VI_MTX(vp), ap->a_td)); -#else - return (debuglockmgr(vp->v_vnlock, vnflags, VI_MTX(vp), ap->a_td, - "vop_sharedlock", vp->filename, vp->line)); -#endif -} - -/* - * Stubs to use when there is no locking to be done on the underlying object. - * A minimal shared lock is necessary to ensure that the underlying object - * is not revoked while an operation is in progress. So, an active shared - * count is maintained in an auxillary vnode lock structure. - */ -int -vop_nolock(ap) - struct vop_lock_args /* { - struct vnode *a_vp; - int a_flags; - struct thread *a_td; - } */ *ap; -{ -#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; - - 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_nolock: bad operation %d", flags & LK_TYPE_MASK); - } - vnflags |= flags & (LK_INTERLOCK | LK_EXTFLG_MASK); - return(lockmgr(vp->v_vnlock, vnflags, VI_MTX(vp), ap->a_td)); -#else /* for now */ - /* - * Since we are not using the lock manager, we must clear - * the interlock here. - */ - if (ap->a_flags & LK_INTERLOCK) - VI_UNLOCK(ap->a_vp); - return (0); -#endif -} - -/* - * Do the inverse of vop_nolock, handling the interlock in a compatible way. - */ -int -vop_nounlock(ap) - struct vop_unlock_args /* { - struct vnode *a_vp; - int a_flags; - struct thread *a_td; - } */ *ap; -{ - - /* - * Since we are not using the lock manager, we must clear - * the interlock here. - */ - if (ap->a_flags & LK_INTERLOCK) - VI_UNLOCK(ap->a_vp); - return (0); -} - -/* - * Return whether or not the node is in use. - */ -int -vop_noislocked(ap) - struct vop_islocked_args /* { - struct vnode *a_vp; - struct thread *a_td; - } */ *ap; -{ - - return (0); -} - -/* * Return our mount point, as we will take charge of the writes. */ int Index: sys/vnode.h =================================================================== RCS file: /home/ncvs/src/sys/sys/vnode.h,v retrieving revision 1.234 diff -u -r1.234 vnode.h --- sys/vnode.h 11 Mar 2004 16:33:11 -0000 1.234 +++ sys/vnode.h 29 Mar 2004 21:57:50 -0000 @@ -697,14 +697,10 @@ int vop_stdlock(struct vop_lock_args *); int vop_stdputpages(struct vop_putpages_args *); int vop_stdunlock(struct vop_unlock_args *); -int vop_noislocked(struct vop_islocked_args *); -int vop_nolock(struct vop_lock_args *); int vop_nopoll(struct vop_poll_args *); -int vop_nounlock(struct vop_unlock_args *); int vop_stdpathconf(struct vop_pathconf_args *); int vop_stdpoll(struct vop_poll_args *); int vop_revoke(struct vop_revoke_args *); -int vop_sharedlock(struct vop_lock_args *); int vop_eopnotsupp(struct vop_generic_args *ap); int vop_ebadf(struct vop_generic_args *ap); int vop_einval(struct vop_generic_args *ap);