Commit 622cba6b authored by Nathan Scott's avatar Nathan Scott

[XFS] Update the vn lock/unlock macros to keep code in sync, no functional change.

SGI Modid: 2.5.x-xfs:slinx:134107a
parent ab19f1a2
...@@ -94,7 +94,7 @@ vn_reclaim(struct vnode *vp) ...@@ -94,7 +94,7 @@ vn_reclaim(struct vnode *vp)
VN_LOCK(vp); VN_LOCK(vp);
vp->v_flag &= (VRECLM|VWAIT); vp->v_flag &= (VRECLM|VWAIT);
VN_UNLOCK(vp); VN_UNLOCK(vp, 0);
vp->v_type = VNON; vp->v_type = VNON;
vp->v_fbhv = NULL; vp->v_fbhv = NULL;
...@@ -115,7 +115,7 @@ vn_wakeup(struct vnode *vp) ...@@ -115,7 +115,7 @@ vn_wakeup(struct vnode *vp)
sv_broadcast(vptosync(vp)); sv_broadcast(vptosync(vp));
} }
vp->v_flag &= ~(VRECLM|VWAIT|VMODIFIED); vp->v_flag &= ~(VRECLM|VWAIT|VMODIFIED);
VN_UNLOCK(vp); VN_UNLOCK(vp, 0);
} }
int int
...@@ -127,7 +127,7 @@ vn_wait(struct vnode *vp) ...@@ -127,7 +127,7 @@ vn_wait(struct vnode *vp)
sv_wait(vptosync(vp), PINOD, &vp->v_lock, 0); sv_wait(vptosync(vp), PINOD, &vp->v_lock, 0);
return 1; return 1;
} }
VN_UNLOCK(vp); VN_UNLOCK(vp, 0);
return 0; return 0;
} }
...@@ -235,7 +235,7 @@ vn_purge(struct vnode *vp, vmap_t *vmap) ...@@ -235,7 +235,7 @@ vn_purge(struct vnode *vp, vmap_t *vmap)
*/ */
VN_LOCK(vp); VN_LOCK(vp);
if (vp->v_number != vmap->v_number) { if (vp->v_number != vmap->v_number) {
VN_UNLOCK(vp); VN_UNLOCK(vp, 0);
return; return;
} }
...@@ -256,13 +256,13 @@ vn_purge(struct vnode *vp, vmap_t *vmap) ...@@ -256,13 +256,13 @@ vn_purge(struct vnode *vp, vmap_t *vmap)
* Another process could have raced in and gotten this vnode... * Another process could have raced in and gotten this vnode...
*/ */
if (vn_count(vp) > 0) { if (vn_count(vp) > 0) {
VN_UNLOCK(vp); VN_UNLOCK(vp, 0);
return; return;
} }
XFS_STATS_DEC(xfsstats.vn_active); XFS_STATS_DEC(xfsstats.vn_active);
vp->v_flag |= VRECLM; vp->v_flag |= VRECLM;
VN_UNLOCK(vp); VN_UNLOCK(vp, 0);
/* /*
* Call VOP_RECLAIM and clean vp. The FSYNC_INVAL flag tells * Call VOP_RECLAIM and clean vp. The FSYNC_INVAL flag tells
...@@ -292,7 +292,7 @@ vn_hold(struct vnode *vp) ...@@ -292,7 +292,7 @@ vn_hold(struct vnode *vp)
VN_LOCK(vp); VN_LOCK(vp);
inode = igrab(LINVFS_GET_IP(vp)); inode = igrab(LINVFS_GET_IP(vp));
ASSERT(inode); ASSERT(inode);
VN_UNLOCK(vp); VN_UNLOCK(vp, 0);
return vp; return vp;
} }
...@@ -324,7 +324,7 @@ vn_rele(struct vnode *vp) ...@@ -324,7 +324,7 @@ vn_rele(struct vnode *vp)
* until we turn off VINACT or VRECLM * until we turn off VINACT or VRECLM
*/ */
vp->v_flag |= VINACT; vp->v_flag |= VINACT;
VN_UNLOCK(vp); VN_UNLOCK(vp, 0);
/* /*
* Do not make the VOP_INACTIVE call if there * Do not make the VOP_INACTIVE call if there
...@@ -345,7 +345,7 @@ vn_rele(struct vnode *vp) ...@@ -345,7 +345,7 @@ vn_rele(struct vnode *vp)
} }
VN_UNLOCK(vp); VN_UNLOCK(vp, 0);
vn_trace_exit(vp, "vn_rele", (inst_t *)__return_address); vn_trace_exit(vp, "vn_rele", (inst_t *)__return_address);
} }
......
...@@ -682,8 +682,8 @@ extern void vn_rele(struct vnode *); ...@@ -682,8 +682,8 @@ extern void vn_rele(struct vnode *);
/* /*
* Vnode spinlock manipulation. * Vnode spinlock manipulation.
*/ */
#define VN_LOCK(vp) spin_lock(&(vp)->v_lock) #define VN_LOCK(vp) mutex_spinlock(&(vp)->v_lock)
#define VN_UNLOCK(vp) spin_unlock(&(vp)->v_lock) #define VN_UNLOCK(vp, s) mutex_spinunlock(&(vp)->v_lock)
#define VN_FLAGSET(vp,b) vn_flagset(vp,b) #define VN_FLAGSET(vp,b) vn_flagset(vp,b)
#define VN_FLAGCLR(vp,b) vn_flagclr(vp,b) #define VN_FLAGCLR(vp,b) vn_flagclr(vp,b)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment