aboutsummaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorJeff Roberson <jeff@FreeBSD.org>2002-09-25 02:45:50 +0000
committerJeff Roberson <jeff@FreeBSD.org>2002-09-25 02:45:50 +0000
commitd4820f803683619b5fcaee9cff42b8f5b015cc3b (patch)
tree8bfdbb5b73f82094d365374315c348adf0d1df8f /sys
parent8823f1b6db716d27bea88af1ab5adb536b3358bd (diff)
Notes
Diffstat (limited to 'sys')
-rw-r--r--sys/ufs/ufs/ufs_inode.c4
-rw-r--r--sys/ufs/ufs/ufs_vnops.c14
2 files changed, 11 insertions, 7 deletions
diff --git a/sys/ufs/ufs/ufs_inode.c b/sys/ufs/ufs/ufs_inode.c
index d32709e5ef459..24faeb3e3c9b3 100644
--- a/sys/ufs/ufs/ufs_inode.c
+++ b/sys/ufs/ufs/ufs_inode.c
@@ -76,8 +76,10 @@ ufs_inactive(ap)
mode_t mode;
int error = 0;
+ VI_LOCK(vp);
if (prtactive && vp->v_usecount != 0)
vprint("ufs_inactive: pushing active", vp);
+ VI_UNLOCK(vp);
/*
* Ignore inodes related to stale file handles.
@@ -149,8 +151,10 @@ ufs_reclaim(ap)
int i;
#endif
+ VI_LOCK(vp);
if (prtactive && vp->v_usecount != 0)
vprint("ufs_reclaim: pushing active", vp);
+ VI_UNLOCK(vp);
if (ip->i_flag & IN_LAZYMOD) {
ip->i_flag |= IN_MODIFIED;
UFS_UPDATE(vp, 0);
diff --git a/sys/ufs/ufs/ufs_vnops.c b/sys/ufs/ufs/ufs_vnops.c
index 5ec4b6e6e89b7..6536a703a71db 100644
--- a/sys/ufs/ufs/ufs_vnops.c
+++ b/sys/ufs/ufs/ufs_vnops.c
@@ -296,12 +296,12 @@ ufs_close(ap)
struct vnode *vp = ap->a_vp;
struct mount *mp;
- mtx_lock(&vp->v_interlock);
+ VI_LOCK(vp);
if (vp->v_usecount > 1) {
ufs_itimes(vp);
- mtx_unlock(&vp->v_interlock);
+ VI_UNLOCK(vp);
} else {
- mtx_unlock(&vp->v_interlock);
+ VI_UNLOCK(vp);
/*
* If we are closing the last reference to an unlinked
* file, then it will be freed by the inactive routine.
@@ -2050,10 +2050,10 @@ ufsspec_close(ap)
{
struct vnode *vp = ap->a_vp;
- mtx_lock(&vp->v_interlock);
+ VI_LOCK(vp);
if (vp->v_usecount > 1)
ufs_itimes(vp);
- mtx_unlock(&vp->v_interlock);
+ VI_UNLOCK(vp);
return (VOCALL(spec_vnodeop_p, VOFFSET(vop_close), ap));
}
@@ -2124,10 +2124,10 @@ ufsfifo_close(ap)
{
struct vnode *vp = ap->a_vp;
- mtx_lock(&vp->v_interlock);
+ VI_LOCK(vp);
if (vp->v_usecount > 1)
ufs_itimes(vp);
- mtx_unlock(&vp->v_interlock);
+ VI_UNLOCK(vp);
return (VOCALL(fifo_vnodeop_p, VOFFSET(vop_close), ap));
}