summaryrefslogtreecommitdiffstats
path: root/sys/fs/nfsserver
diff options
context:
space:
mode:
authorzack <zack@FreeBSD.org>2011-07-16 08:05:36 +0000
committerzack <zack@FreeBSD.org>2011-07-16 08:05:36 +0000
commit455196dc7aa59be14285299f0679b2ee2e194a59 (patch)
tree073f87d1cb4b9e6cd5d1d71291f4663c02f052ac /sys/fs/nfsserver
parentd626afc8b3e9aead1393c2c520688f2e4f16415d (diff)
downloadFreeBSD-src-455196dc7aa59be14285299f0679b2ee2e194a59.zip
FreeBSD-src-455196dc7aa59be14285299f0679b2ee2e194a59.tar.gz
Simple find/replace of VOP_UNLOCK -> NFSVOPUNLOCK. This is done so that NFSVOPUNLOCK can be modified later to add enhanced logging and assertions.
Reviewed by: rmacklem Approved by: zml (mentor) MFC after: 2 weeks
Diffstat (limited to 'sys/fs/nfsserver')
-rw-r--r--sys/fs/nfsserver/nfs_nfsdport.c16
-rw-r--r--sys/fs/nfsserver/nfs_nfsdserv.c6
-rw-r--r--sys/fs/nfsserver/nfs_nfsdsocket.c8
-rw-r--r--sys/fs/nfsserver/nfs_nfsdstate.c8
4 files changed, 19 insertions, 19 deletions
diff --git a/sys/fs/nfsserver/nfs_nfsdport.c b/sys/fs/nfsserver/nfs_nfsdport.c
index 6e64cfc..c941f97 100644
--- a/sys/fs/nfsserver/nfs_nfsdport.c
+++ b/sys/fs/nfsserver/nfs_nfsdport.c
@@ -123,7 +123,7 @@ nfsvno_getattr(struct vnode *vp, struct nfsvattr *nvap, struct ucred *cred,
}
error = VOP_GETATTR(vp, &nvap->na_vattr, cred);
if (lockedit != 0)
- VOP_UNLOCK(vp, 0);
+ NFSVOPUNLOCK(vp, 0);
return (error);
}
@@ -191,7 +191,7 @@ nfsvno_accchk(struct vnode *vp, accmode_t accmode, struct ucred *cred,
}
if (error != 0) {
if (vpislocked == 0)
- VOP_UNLOCK(vp, 0);
+ NFSVOPUNLOCK(vp, 0);
return (error);
}
@@ -231,7 +231,7 @@ nfsvno_accchk(struct vnode *vp, accmode_t accmode, struct ucred *cred,
}
}
if (vpislocked == 0)
- VOP_UNLOCK(vp, 0);
+ NFSVOPUNLOCK(vp, 0);
return (error);
}
@@ -1099,7 +1099,7 @@ nfsvno_rename(struct nameidata *fromndp, struct nameidata *tondp,
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)
@@ -1167,7 +1167,7 @@ nfsvno_link(struct nameidata *ndp, struct vnode *vp, struct ucred *cred,
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);
@@ -1887,7 +1887,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) {
@@ -2001,7 +2001,7 @@ again:
r = VOP_LOOKUP(vp, &nvp,
&cn);
if (vp != nvp)
- VOP_UNLOCK(vp,
+ NFSVOPUNLOCK(vp,
0);
}
}
@@ -2080,7 +2080,7 @@ again:
if (nvp != NULL) {
supports_nfsv4acls =
nfs_supportsnfsv4acls(nvp);
- VOP_UNLOCK(nvp, 0);
+ NFSVOPUNLOCK(nvp, 0);
} else
supports_nfsv4acls = 0;
if (refp != NULL) {
diff --git a/sys/fs/nfsserver/nfs_nfsdserv.c b/sys/fs/nfsserver/nfs_nfsdserv.c
index e9b3cfb..802868a 100644
--- a/sys/fs/nfsserver/nfs_nfsdserv.c
+++ b/sys/fs/nfsserver/nfs_nfsdserv.c
@@ -235,7 +235,7 @@ nfsrvd_getattr(struct nfsrv_descript *nd, int isdgram,
} 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, __unused int isdgram,
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 *nd, struct nameidata *ndp,
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);
diff --git a/sys/fs/nfsserver/nfs_nfsdsocket.c b/sys/fs/nfsserver/nfs_nfsdsocket.c
index a76ff5c..8dc4aa6 100644
--- a/sys/fs/nfsserver/nfs_nfsdsocket.c
+++ b/sys/fs/nfsserver/nfs_nfsdsocket.c
@@ -705,7 +705,7 @@ nfsrvd_compound(struct nfsrv_descript *nd, int isdgram,
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 *nd, int isdgram,
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 *nd, int isdgram,
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 *nd, int isdgram,
}
}
/* Lookup ops return a locked vnode */
- VOP_UNLOCK(nvp, 0);
+ NFSVOPUNLOCK(nvp, 0);
}
if (!nd->nd_repstat) {
vrele(vp);
diff --git a/sys/fs/nfsserver/nfs_nfsdstate.c b/sys/fs/nfsserver/nfs_nfsdstate.c
index 96e1d54..8645f6e 100644
--- a/sys/fs/nfsserver/nfs_nfsdstate.c
+++ b/sys/fs/nfsserver/nfs_nfsdstate.c
@@ -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 *clp, int *haslockp, vnode_t vp,
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, int *haslockp, NFSPROC_T *p,
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, NFSPROC_T *p)
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) {
OpenPOWER on IntegriCloud