diff --git a/sys/nfs/nfs_common.c b/sys/nfs/nfs_common.c index 15497ffe3b22..572ccc2ae9ab 100644 --- a/sys/nfs/nfs_common.c +++ b/sys/nfs/nfs_common.c @@ -34,7 +34,7 @@ * SUCH DAMAGE. * * @(#)nfs_subs.c 8.3 (Berkeley) 1/4/94 - * $Id$ + * $Id: nfs_subs.c,v 1.37 1997/02/22 09:42:41 peter Exp $ */ /* @@ -1280,14 +1280,6 @@ nfs_loadattrcache(vpp, mdp, dposp, vaper) */ np = VTONFS(vp); if (vp->v_type != vtyp) { - /* - * If we had a lock and it turns out that the vnode - * is an object which we don't want to lock (e.g. VDIR) - * to avoid nasty hanging problems on a server crash, - * then release it here. - */ - if (vtyp != VREG && VOP_ISLOCKED(vp)) - VOP_UNLOCK(vp, 0, p); vp->v_type = vtyp; if (vp->v_type == VFIFO) { vp->v_op = fifo_nfsv2nodeop_p; diff --git a/sys/nfs/nfs_subs.c b/sys/nfs/nfs_subs.c index 15497ffe3b22..572ccc2ae9ab 100644 --- a/sys/nfs/nfs_subs.c +++ b/sys/nfs/nfs_subs.c @@ -34,7 +34,7 @@ * SUCH DAMAGE. * * @(#)nfs_subs.c 8.3 (Berkeley) 1/4/94 - * $Id$ + * $Id: nfs_subs.c,v 1.37 1997/02/22 09:42:41 peter Exp $ */ /* @@ -1280,14 +1280,6 @@ nfs_loadattrcache(vpp, mdp, dposp, vaper) */ np = VTONFS(vp); if (vp->v_type != vtyp) { - /* - * If we had a lock and it turns out that the vnode - * is an object which we don't want to lock (e.g. VDIR) - * to avoid nasty hanging problems on a server crash, - * then release it here. - */ - if (vtyp != VREG && VOP_ISLOCKED(vp)) - VOP_UNLOCK(vp, 0, p); vp->v_type = vtyp; if (vp->v_type == VFIFO) { vp->v_op = fifo_nfsv2nodeop_p; diff --git a/sys/nfs/nfs_vfsops.c b/sys/nfs/nfs_vfsops.c index fcc6a4c1144b..84963cf58304 100644 --- a/sys/nfs/nfs_vfsops.c +++ b/sys/nfs/nfs_vfsops.c @@ -34,7 +34,7 @@ * SUCH DAMAGE. * * @(#)nfs_vfsops.c 8.12 (Berkeley) 5/20/95 - * $Id: nfs_vfsops.c,v 1.35 1997/02/22 09:42:44 peter Exp $ + * $Id: nfs_vfsops.c,v 1.36 1997/03/24 11:33:39 bde Exp $ */ #include @@ -904,7 +904,6 @@ nfs_root(mp, vpp) if (error) return (error); vp = NFSTOV(np); - VOP_UNLOCK(vp, 0, curproc); if (vp->v_type == VNON) vp->v_type = VDIR; vp->v_flag = VROOT; diff --git a/sys/nfs/nfs_vnops.c b/sys/nfs/nfs_vnops.c index 060a5782d462..0d9062732f18 100644 --- a/sys/nfs/nfs_vnops.c +++ b/sys/nfs/nfs_vnops.c @@ -34,7 +34,7 @@ * SUCH DAMAGE. * * @(#)nfs_vnops.c 8.16 (Berkeley) 5/27/95 - * $Id: nfs_vnops.c,v 1.44 1997/03/22 06:53:12 bde Exp $ + * $Id: nfs_vnops.c,v 1.45 1997/03/29 12:40:20 bde Exp $ */ @@ -1603,7 +1603,7 @@ nfs_rename(ap) */ if (tvp && tvp->v_usecount > 1 && !VTONFS(tvp)->n_sillyrename && tvp->v_type != VDIR && !nfs_sillyrename(tdvp, tvp, tcnp)) { - vrele(tvp); + vput(tvp); tvp = NULL; } diff --git a/sys/nfs/nfsnode.h b/sys/nfs/nfsnode.h index d2038a04aa27..540d80387863 100644 --- a/sys/nfs/nfsnode.h +++ b/sys/nfs/nfsnode.h @@ -34,7 +34,7 @@ * SUCH DAMAGE. * * @(#)nfsnode.h 8.9 (Berkeley) 5/14/95 - * $Id$ + * $Id: nfsnode.h,v 1.19 1997/02/22 09:42:49 peter Exp $ */ @@ -169,7 +169,7 @@ int nqnfs_vop_lease_check __P((struct vop_lease_args *)); int nfs_abortop __P((struct vop_abortop_args *)); int nfs_inactive __P((struct vop_inactive_args *)); int nfs_reclaim __P((struct vop_reclaim_args *)); -#define nfs_lock ((int (*) __P((struct vop_lock_args *)))vop_nolock) +#define nfs_lock ((int (*) __P((struct vop_lock_args *)))vop_sharedlock) #define nfs_unlock ((int (*) __P((struct vop_unlock_args *)))vop_nounlock) #define nfs_islocked ((int (*) __P((struct vop_islocked_args *)))vop_noislocked) #define nfs_reallocblks \ diff --git a/sys/nfsclient/nfs_subs.c b/sys/nfsclient/nfs_subs.c index 15497ffe3b22..572ccc2ae9ab 100644 --- a/sys/nfsclient/nfs_subs.c +++ b/sys/nfsclient/nfs_subs.c @@ -34,7 +34,7 @@ * SUCH DAMAGE. * * @(#)nfs_subs.c 8.3 (Berkeley) 1/4/94 - * $Id$ + * $Id: nfs_subs.c,v 1.37 1997/02/22 09:42:41 peter Exp $ */ /* @@ -1280,14 +1280,6 @@ nfs_loadattrcache(vpp, mdp, dposp, vaper) */ np = VTONFS(vp); if (vp->v_type != vtyp) { - /* - * If we had a lock and it turns out that the vnode - * is an object which we don't want to lock (e.g. VDIR) - * to avoid nasty hanging problems on a server crash, - * then release it here. - */ - if (vtyp != VREG && VOP_ISLOCKED(vp)) - VOP_UNLOCK(vp, 0, p); vp->v_type = vtyp; if (vp->v_type == VFIFO) { vp->v_op = fifo_nfsv2nodeop_p; diff --git a/sys/nfsclient/nfs_vfsops.c b/sys/nfsclient/nfs_vfsops.c index fcc6a4c1144b..84963cf58304 100644 --- a/sys/nfsclient/nfs_vfsops.c +++ b/sys/nfsclient/nfs_vfsops.c @@ -34,7 +34,7 @@ * SUCH DAMAGE. * * @(#)nfs_vfsops.c 8.12 (Berkeley) 5/20/95 - * $Id: nfs_vfsops.c,v 1.35 1997/02/22 09:42:44 peter Exp $ + * $Id: nfs_vfsops.c,v 1.36 1997/03/24 11:33:39 bde Exp $ */ #include @@ -904,7 +904,6 @@ nfs_root(mp, vpp) if (error) return (error); vp = NFSTOV(np); - VOP_UNLOCK(vp, 0, curproc); if (vp->v_type == VNON) vp->v_type = VDIR; vp->v_flag = VROOT; diff --git a/sys/nfsclient/nfs_vnops.c b/sys/nfsclient/nfs_vnops.c index 060a5782d462..0d9062732f18 100644 --- a/sys/nfsclient/nfs_vnops.c +++ b/sys/nfsclient/nfs_vnops.c @@ -34,7 +34,7 @@ * SUCH DAMAGE. * * @(#)nfs_vnops.c 8.16 (Berkeley) 5/27/95 - * $Id: nfs_vnops.c,v 1.44 1997/03/22 06:53:12 bde Exp $ + * $Id: nfs_vnops.c,v 1.45 1997/03/29 12:40:20 bde Exp $ */ @@ -1603,7 +1603,7 @@ nfs_rename(ap) */ if (tvp && tvp->v_usecount > 1 && !VTONFS(tvp)->n_sillyrename && tvp->v_type != VDIR && !nfs_sillyrename(tdvp, tvp, tcnp)) { - vrele(tvp); + vput(tvp); tvp = NULL; } diff --git a/sys/nfsclient/nfsnode.h b/sys/nfsclient/nfsnode.h index d2038a04aa27..540d80387863 100644 --- a/sys/nfsclient/nfsnode.h +++ b/sys/nfsclient/nfsnode.h @@ -34,7 +34,7 @@ * SUCH DAMAGE. * * @(#)nfsnode.h 8.9 (Berkeley) 5/14/95 - * $Id$ + * $Id: nfsnode.h,v 1.19 1997/02/22 09:42:49 peter Exp $ */ @@ -169,7 +169,7 @@ int nqnfs_vop_lease_check __P((struct vop_lease_args *)); int nfs_abortop __P((struct vop_abortop_args *)); int nfs_inactive __P((struct vop_inactive_args *)); int nfs_reclaim __P((struct vop_reclaim_args *)); -#define nfs_lock ((int (*) __P((struct vop_lock_args *)))vop_nolock) +#define nfs_lock ((int (*) __P((struct vop_lock_args *)))vop_sharedlock) #define nfs_unlock ((int (*) __P((struct vop_unlock_args *)))vop_nounlock) #define nfs_islocked ((int (*) __P((struct vop_islocked_args *)))vop_noislocked) #define nfs_reallocblks \ diff --git a/sys/nfsserver/nfs_srvsubs.c b/sys/nfsserver/nfs_srvsubs.c index 15497ffe3b22..572ccc2ae9ab 100644 --- a/sys/nfsserver/nfs_srvsubs.c +++ b/sys/nfsserver/nfs_srvsubs.c @@ -34,7 +34,7 @@ * SUCH DAMAGE. * * @(#)nfs_subs.c 8.3 (Berkeley) 1/4/94 - * $Id$ + * $Id: nfs_subs.c,v 1.37 1997/02/22 09:42:41 peter Exp $ */ /* @@ -1280,14 +1280,6 @@ nfs_loadattrcache(vpp, mdp, dposp, vaper) */ np = VTONFS(vp); if (vp->v_type != vtyp) { - /* - * If we had a lock and it turns out that the vnode - * is an object which we don't want to lock (e.g. VDIR) - * to avoid nasty hanging problems on a server crash, - * then release it here. - */ - if (vtyp != VREG && VOP_ISLOCKED(vp)) - VOP_UNLOCK(vp, 0, p); vp->v_type = vtyp; if (vp->v_type == VFIFO) { vp->v_op = fifo_nfsv2nodeop_p;