From owner-svn-src-stable-8@FreeBSD.ORG Sat Aug 13 17:18:45 2011 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id ED10A106566B; Sat, 13 Aug 2011 17:18:45 +0000 (UTC) (envelope-from zack@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id DB5D08FC1D; Sat, 13 Aug 2011 17:18:45 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p7DHIjGA025738; Sat, 13 Aug 2011 17:18:45 GMT (envelope-from zack@svn.freebsd.org) Received: (from zack@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p7DHIj55025729; Sat, 13 Aug 2011 17:18:45 GMT (envelope-from zack@svn.freebsd.org) Message-Id: <201108131718.p7DHIj55025729@svn.freebsd.org> From: Zack Kirsch Date: Sat, 13 Aug 2011 17:18:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r224848 - in stable/8/sys/fs: nfs nfsclient nfsserver X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 13 Aug 2011 17:18:46 -0000 Author: zack Date: Sat Aug 13 17:18:45 2011 New Revision: 224848 URL: http://svn.freebsd.org/changeset/base/224848 Log: MFC: 224082 Simple find/replace of VOP_UNLOCK -> NFSVOPUNLOCK. This is done so that NFSVOPUNLOCK can be modified later to add enhanced logging and assertions. Modified: stable/8/sys/fs/nfs/nfs_commonsubs.c stable/8/sys/fs/nfsclient/nfs_clport.c stable/8/sys/fs/nfsclient/nfs_clvfsops.c stable/8/sys/fs/nfsclient/nfs_clvnops.c stable/8/sys/fs/nfsserver/nfs_nfsdport.c stable/8/sys/fs/nfsserver/nfs_nfsdserv.c stable/8/sys/fs/nfsserver/nfs_nfsdsocket.c stable/8/sys/fs/nfsserver/nfs_nfsdstate.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) Modified: stable/8/sys/fs/nfs/nfs_commonsubs.c ============================================================================== --- stable/8/sys/fs/nfs/nfs_commonsubs.c Sat Aug 13 17:17:59 2011 (r224847) +++ stable/8/sys/fs/nfs/nfs_commonsubs.c Sat Aug 13 17:18:45 2011 (r224848) @@ -2000,7 +2000,7 @@ nfsv4_fillattr(struct nfsrv_descript *nd if (error == 0) error = VOP_GETACL(vp, ACL_TYPE_NFS4, naclp, cred, p); - VOP_UNLOCK(vp, 0); + NFSVOPUNLOCK(vp, 0); } else error = NFSERR_PERM; if (error != 0) { Modified: stable/8/sys/fs/nfsclient/nfs_clport.c ============================================================================== --- stable/8/sys/fs/nfsclient/nfs_clport.c Sat Aug 13 17:17:59 2011 (r224847) +++ stable/8/sys/fs/nfsclient/nfs_clport.c Sat Aug 13 17:18:45 2011 (r224848) @@ -295,7 +295,7 @@ nfscl_ngetreopen(struct mount *mntp, u_i error = vfs_hash_get(mntp, hash, (LK_EXCLUSIVE | LK_NOWAIT), td, &nvp, newnfs_vncmpf, nfhp); if (error == 0 && nvp != NULL) { - VOP_UNLOCK(nvp, 0); + NFSVOPUNLOCK(nvp, 0); } else if (error == EBUSY) { /* * The LK_EXCLOTHER lock type tells nfs_lock1() to not try Modified: stable/8/sys/fs/nfsclient/nfs_clvfsops.c ============================================================================== --- stable/8/sys/fs/nfsclient/nfs_clvfsops.c Sat Aug 13 17:17:59 2011 (r224847) +++ stable/8/sys/fs/nfsclient/nfs_clvfsops.c Sat Aug 13 17:18:45 2011 (r224848) @@ -1340,7 +1340,7 @@ mountnfs(struct nfs_args *argp, struct m /* * Lose the lock but keep the ref. */ - VOP_UNLOCK(*vpp, 0); + NFSVOPUNLOCK(*vpp, 0); return (0); } error = EIO; @@ -1487,7 +1487,7 @@ loop: error = VOP_FSYNC(vp, waitfor, td); if (error) allerror = error; - VOP_UNLOCK(vp, 0); + NFSVOPUNLOCK(vp, 0); vrele(vp); MNT_ILOCK(mp); Modified: stable/8/sys/fs/nfsclient/nfs_clvnops.c ============================================================================== --- stable/8/sys/fs/nfsclient/nfs_clvnops.c Sat Aug 13 17:17:59 2011 (r224847) +++ stable/8/sys/fs/nfsclient/nfs_clvnops.c Sat Aug 13 17:18:45 2011 (r224848) @@ -1175,7 +1175,7 @@ nfs_lookup(struct vop_lookup_args *ap) error = vfs_busy(mp, MBF_NOWAIT); if (error != 0) { vfs_ref(mp); - VOP_UNLOCK(dvp, 0); + NFSVOPUNLOCK(dvp, 0); error = vfs_busy(mp, 0); NFSVOPLOCK(dvp, ltype | LK_RETRY); vfs_rel(mp); @@ -1186,7 +1186,7 @@ nfs_lookup(struct vop_lookup_args *ap) if (error != 0) return (error); } - VOP_UNLOCK(dvp, 0); + NFSVOPUNLOCK(dvp, 0); error = nfscl_nget(mp, dvp, nfhp, cnp, td, &np, NULL, cnp->cn_lkflags); if (error == 0) @@ -1724,7 +1724,7 @@ nfs_rename(struct vop_rename_args *ap) * this condition can result in potential (silent) data loss. */ error = VOP_FSYNC(fvp, MNT_WAIT, fcnp->cn_thread); - VOP_UNLOCK(fvp, 0); + NFSVOPUNLOCK(fvp, 0); if (!error && tvp) error = VOP_FSYNC(tvp, MNT_WAIT, tcnp->cn_thread); if (error) @@ -2881,7 +2881,7 @@ nfs_advlock(struct vop_advlock_args *ap) cred = td->td_ucred; NFSVOPLOCK(vp, LK_EXCLUSIVE | LK_RETRY); if (vp->v_iflag & VI_DOOMED) { - VOP_UNLOCK(vp, 0); + NFSVOPUNLOCK(vp, 0); return (EBADF); } @@ -2904,27 +2904,27 @@ nfs_advlock(struct vop_advlock_args *ap) ap->a_fl, 0, cred, td, ap->a_id, ap->a_flags); if (ret == NFSERR_DENIED && (ap->a_flags & F_WAIT) && ap->a_op == F_SETLK) { - VOP_UNLOCK(vp, 0); + NFSVOPUNLOCK(vp, 0); error = nfs_catnap(PZERO | PCATCH, ret, "ncladvl"); if (error) return (EINTR); NFSVOPLOCK(vp, LK_EXCLUSIVE | LK_RETRY); if (vp->v_iflag & VI_DOOMED) { - VOP_UNLOCK(vp, 0); + NFSVOPUNLOCK(vp, 0); return (EBADF); } } } while (ret == NFSERR_DENIED && (ap->a_flags & F_WAIT) && ap->a_op == F_SETLK); if (ret == NFSERR_DENIED) { - VOP_UNLOCK(vp, 0); + NFSVOPUNLOCK(vp, 0); return (EAGAIN); } else if (ret == EINVAL || ret == EBADF || ret == EINTR) { - VOP_UNLOCK(vp, 0); + NFSVOPUNLOCK(vp, 0); return (ret); } else if (ret != 0) { - VOP_UNLOCK(vp, 0); + NFSVOPUNLOCK(vp, 0); return (EACCES); } @@ -2949,7 +2949,7 @@ nfs_advlock(struct vop_advlock_args *ap) } } } - VOP_UNLOCK(vp, 0); + NFSVOPUNLOCK(vp, 0); return (0); } else if (!NFS_ISV4(vp)) { error = NFSVOPLOCK(vp, LK_SHARED); @@ -2957,13 +2957,13 @@ nfs_advlock(struct vop_advlock_args *ap) return (error); if ((VFSTONFS(vp->v_mount)->nm_flag & NFSMNT_NOLOCKD) != 0) { size = VTONFS(vp)->n_size; - VOP_UNLOCK(vp, 0); + NFSVOPUNLOCK(vp, 0); error = lf_advlock(ap, &(vp->v_lockf), size); } else { if (nfs_advlock_p != NULL) error = nfs_advlock_p(ap); else { - VOP_UNLOCK(vp, 0); + NFSVOPUNLOCK(vp, 0); error = ENOLCK; } } @@ -2988,10 +2988,10 @@ nfs_advlockasync(struct vop_advlockasync return (error); if ((VFSTONFS(vp->v_mount)->nm_flag & NFSMNT_NOLOCKD) != 0) { size = VTONFS(vp)->n_size; - VOP_UNLOCK(vp, 0); + NFSVOPUNLOCK(vp, 0); error = lf_advlockasync(ap, &(vp->v_lockf), size); } else { - VOP_UNLOCK(vp, 0); + NFSVOPUNLOCK(vp, 0); error = EOPNOTSUPP; } return (error); Modified: stable/8/sys/fs/nfsserver/nfs_nfsdport.c ============================================================================== --- stable/8/sys/fs/nfsserver/nfs_nfsdport.c Sat Aug 13 17:17:59 2011 (r224847) +++ stable/8/sys/fs/nfsserver/nfs_nfsdport.c Sat Aug 13 17:18:45 2011 (r224848) @@ -121,7 +121,7 @@ nfsvno_getattr(struct vnode *vp, struct } error = VOP_GETATTR(vp, &nvap->na_vattr, cred); if (lockedit != 0) - VOP_UNLOCK(vp, 0); + NFSVOPUNLOCK(vp, 0); return (error); } @@ -189,7 +189,7 @@ nfsvno_accchk(struct vnode *vp, accmode_ } if (error != 0) { if (vpislocked == 0) - VOP_UNLOCK(vp, 0); + NFSVOPUNLOCK(vp, 0); return (error); } @@ -229,7 +229,7 @@ nfsvno_accchk(struct vnode *vp, accmode_ } } if (vpislocked == 0) - VOP_UNLOCK(vp, 0); + NFSVOPUNLOCK(vp, 0); return (error); } @@ -1097,7 +1097,7 @@ nfsvno_rename(struct nameidata *fromndp, if (ndflag & ND_NFSV4) { if (NFSVOPLOCK(fvp, LK_EXCLUSIVE) == 0) { error = nfsrv_checkremove(fvp, 0, p); - VOP_UNLOCK(fvp, 0); + NFSVOPUNLOCK(fvp, 0); } else error = EPERM; if (tvp && !error) @@ -1165,7 +1165,7 @@ nfsvno_link(struct nameidata *ndp, struc vrele(ndp->ni_dvp); else vput(ndp->ni_dvp); - VOP_UNLOCK(vp, 0); + NFSVOPUNLOCK(vp, 0); } else { if (ndp->ni_dvp == ndp->ni_vp) vrele(ndp->ni_dvp); @@ -1884,7 +1884,7 @@ again: */ mp = vp->v_mount; vfs_ref(mp); - VOP_UNLOCK(vp, 0); + NFSVOPUNLOCK(vp, 0); nd->nd_repstat = vfs_busy(mp, 0); vfs_rel(mp); if (nd->nd_repstat != 0) { @@ -1998,7 +1998,7 @@ again: r = VOP_LOOKUP(vp, &nvp, &cn); if (vp != nvp) - VOP_UNLOCK(vp, + NFSVOPUNLOCK(vp, 0); } } @@ -2077,7 +2077,7 @@ again: if (nvp != NULL) { supports_nfsv4acls = nfs_supportsnfsv4acls(nvp); - VOP_UNLOCK(nvp, 0); + NFSVOPUNLOCK(nvp, 0); } else supports_nfsv4acls = 0; if (refp != NULL) { Modified: stable/8/sys/fs/nfsserver/nfs_nfsdserv.c ============================================================================== --- stable/8/sys/fs/nfsserver/nfs_nfsdserv.c Sat Aug 13 17:17:59 2011 (r224847) +++ stable/8/sys/fs/nfsserver/nfs_nfsdserv.c Sat Aug 13 17:18:45 2011 (r224848) @@ -235,7 +235,7 @@ nfsrvd_getattr(struct nfsrv_descript *nd } else at_root = 0; vfs_ref(mp); - VOP_UNLOCK(vp, 0); + NFSVOPUNLOCK(vp, 0); if (at_root != 0) { if ((nd->nd_repstat = NFSVOPLOCK(tvp, LK_SHARED)) == 0) { @@ -1276,7 +1276,7 @@ nfsrvd_mknod(struct nfsrv_descript *nd, nd->nd_repstat = nfsvno_getattr(vp, &nva, nd->nd_cred, p, 1); if (vpp != NULL && nd->nd_repstat == 0) { - VOP_UNLOCK(vp, 0); + NFSVOPUNLOCK(vp, 0); *vpp = vp; } else vput(vp); @@ -1735,7 +1735,7 @@ nfsrvd_symlinksub(struct nfsrv_descript nvap, nd->nd_cred, p, 1); } if (vpp != NULL && nd->nd_repstat == 0) { - VOP_UNLOCK(ndp->ni_vp, 0); + NFSVOPUNLOCK(ndp->ni_vp, 0); *vpp = ndp->ni_vp; } else vput(ndp->ni_vp); Modified: stable/8/sys/fs/nfsserver/nfs_nfsdsocket.c ============================================================================== --- stable/8/sys/fs/nfsserver/nfs_nfsdsocket.c Sat Aug 13 17:17:59 2011 (r224847) +++ stable/8/sys/fs/nfsserver/nfs_nfsdsocket.c Sat Aug 13 17:18:45 2011 (r224848) @@ -705,7 +705,7 @@ nfsrvd_compound(struct nfsrv_descript *n vrele(vp); vp = nvp; cur_fsid = vp->v_mount->mnt_stat.f_fsid; - VOP_UNLOCK(vp, 0); + NFSVOPUNLOCK(vp, 0); vpnes = nes; } break; @@ -720,7 +720,7 @@ nfsrvd_compound(struct nfsrv_descript *n vrele(vp); vp = nvp; cur_fsid = vp->v_mount->mnt_stat.f_fsid; - VOP_UNLOCK(vp, 0); + NFSVOPUNLOCK(vp, 0); vpnes = nes; } break; @@ -733,7 +733,7 @@ nfsrvd_compound(struct nfsrv_descript *n vrele(vp); vp = nvp; cur_fsid = vp->v_mount->mnt_stat.f_fsid; - VOP_UNLOCK(vp, 0); + NFSVOPUNLOCK(vp, 0); vpnes = nes; } } else @@ -840,7 +840,7 @@ nfsrvd_compound(struct nfsrv_descript *n } } /* Lookup ops return a locked vnode */ - VOP_UNLOCK(nvp, 0); + NFSVOPUNLOCK(nvp, 0); } if (!nd->nd_repstat) { vrele(vp); Modified: stable/8/sys/fs/nfsserver/nfs_nfsdstate.c ============================================================================== --- stable/8/sys/fs/nfsserver/nfs_nfsdstate.c Sat Aug 13 17:17:59 2011 (r224847) +++ stable/8/sys/fs/nfsserver/nfs_nfsdstate.c Sat Aug 13 17:18:45 2011 (r224848) @@ -4099,7 +4099,7 @@ nfsrv_updatestable(NFSPROC_T *p) if (NFSVOPLOCK(vp, LK_EXCLUSIVE) == 0) { error = nfsvno_setattr(vp, &nva, NFSFPCRED(sf->nsf_fp), p, NULL); - VOP_UNLOCK(vp, 0); + NFSVOPUNLOCK(vp, 0); } else error = EPERM; vn_finished_write(mp); @@ -4249,7 +4249,7 @@ nfsrv_clientconflict(struct nfsclient *c if (*haslockp == 0) { NFSUNLOCKSTATE(); lktype = VOP_ISLOCKED(vp); - VOP_UNLOCK(vp, 0); + NFSVOPUNLOCK(vp, 0); NFSLOCKV4ROOTMUTEX(); nfsv4_relref(&nfsv4rootfs_lock); do { @@ -4417,7 +4417,7 @@ nfsrv_delegconflict(struct nfsstate *stp if (*haslockp == 0) { NFSUNLOCKSTATE(); lktype = VOP_ISLOCKED(vp); - VOP_UNLOCK(vp, 0); + NFSVOPUNLOCK(vp, 0); NFSLOCKV4ROOTMUTEX(); nfsv4_relref(&nfsv4rootfs_lock); do { @@ -4628,7 +4628,7 @@ nfsd_recalldelegation(vnode_t vp, NFSPRO do { if (NFSVOPLOCK(vp, LK_EXCLUSIVE) == 0) { error = nfsrv_checkremove(vp, 0, p); - VOP_UNLOCK(vp, 0); + NFSVOPUNLOCK(vp, 0); } else error = EPERM; if (error == NFSERR_DELAY) {