Simple find/replace of VOP_ISLOCKED -> NFSVOPISLOCKED. This is done so that NFSVOPISLOCKED can be modified later to add enhanced logging and assertions.
Reviewed by: rmacklem Approved by: zml (mentor) MFC after: 2 weeks
This commit is contained in:
parent
a998963469
commit
68347a92db
@ -143,7 +143,7 @@ ncl_upgrade_vnlock(struct vnode *vp)
|
||||
int old_lock;
|
||||
|
||||
ASSERT_VOP_LOCKED(vp, "ncl_upgrade_vnlock");
|
||||
old_lock = VOP_ISLOCKED(vp);
|
||||
old_lock = NFSVOPISLOCKED(vp);
|
||||
if (old_lock != LK_EXCLUSIVE) {
|
||||
KASSERT(old_lock == LK_SHARED,
|
||||
("ncl_upgrade_vnlock: wrong old_lock %d", old_lock));
|
||||
|
@ -1477,7 +1477,7 @@ nfs_sync(struct mount *mp, int waitfor)
|
||||
VI_LOCK(vp);
|
||||
MNT_IUNLOCK(mp);
|
||||
/* XXX Racy bv_cnt check. */
|
||||
if (VOP_ISLOCKED(vp) || vp->v_bufobj.bo_dirty.bv_cnt == 0 ||
|
||||
if (NFSVOPISLOCKED(vp) || vp->v_bufobj.bo_dirty.bv_cnt == 0 ||
|
||||
waitfor == MNT_LAZY) {
|
||||
VI_UNLOCK(vp);
|
||||
MNT_ILOCK(mp);
|
||||
|
@ -1209,7 +1209,7 @@ nfs_lookup(struct vop_lookup_args *ap)
|
||||
}
|
||||
|
||||
if (flags & ISDOTDOT) {
|
||||
ltype = VOP_ISLOCKED(dvp);
|
||||
ltype = NFSVOPISLOCKED(dvp);
|
||||
error = vfs_busy(mp, MBF_NOWAIT);
|
||||
if (error != 0) {
|
||||
vfs_ref(mp);
|
||||
|
@ -116,7 +116,7 @@ nfsvno_getattr(struct vnode *vp, struct nfsvattr *nvap, struct ucred *cred,
|
||||
* locked by this thread or not locked by this thread.
|
||||
* As such, shared lock it, if not exclusively locked.
|
||||
*/
|
||||
if (VOP_ISLOCKED(vp) != LK_EXCLUSIVE) {
|
||||
if (NFSVOPISLOCKED(vp) != LK_EXCLUSIVE) {
|
||||
lockedit = 1;
|
||||
NFSVOPLOCK(vp, LK_SHARED | LK_RETRY);
|
||||
}
|
||||
|
@ -4248,7 +4248,7 @@ nfsrv_clientconflict(struct nfsclient *clp, int *haslockp, vnode_t vp,
|
||||
return (0);
|
||||
if (*haslockp == 0) {
|
||||
NFSUNLOCKSTATE();
|
||||
lktype = VOP_ISLOCKED(vp);
|
||||
lktype = NFSVOPISLOCKED(vp);
|
||||
NFSVOPUNLOCK(vp, 0);
|
||||
NFSLOCKV4ROOTMUTEX();
|
||||
nfsv4_relref(&nfsv4rootfs_lock);
|
||||
@ -4416,7 +4416,7 @@ nfsrv_delegconflict(struct nfsstate *stp, int *haslockp, NFSPROC_T *p,
|
||||
*/
|
||||
if (*haslockp == 0) {
|
||||
NFSUNLOCKSTATE();
|
||||
lktype = VOP_ISLOCKED(vp);
|
||||
lktype = NFSVOPISLOCKED(vp);
|
||||
NFSVOPUNLOCK(vp, 0);
|
||||
NFSLOCKV4ROOTMUTEX();
|
||||
nfsv4_relref(&nfsv4rootfs_lock);
|
||||
@ -4610,7 +4610,7 @@ nfsd_recalldelegation(vnode_t vp, NFSPROC_T *p)
|
||||
nfsrv_issuedelegs == 0)
|
||||
return;
|
||||
|
||||
KASSERT((VOP_ISLOCKED(vp) != LK_EXCLUSIVE), ("vp %p is locked", vp));
|
||||
KASSERT((NFSVOPISLOCKED(vp) != LK_EXCLUSIVE), ("vp %p is locked", vp));
|
||||
/*
|
||||
* First, get a reference on the nfsv4rootfs_lock so that an
|
||||
* exclusive lock cannot be acquired by another thread.
|
||||
|
Loading…
Reference in New Issue
Block a user