diff options
Diffstat (limited to 'sys/msdosfs')
-rw-r--r-- | sys/msdosfs/msdosfs_denode.c | 16 | ||||
-rw-r--r-- | sys/msdosfs/msdosfs_vfsops.c | 14 | ||||
-rw-r--r-- | sys/msdosfs/msdosfs_vnops.c | 4 |
3 files changed, 17 insertions, 17 deletions
diff --git a/sys/msdosfs/msdosfs_denode.c b/sys/msdosfs/msdosfs_denode.c index 6c1a3c7..dbdf554 100644 --- a/sys/msdosfs/msdosfs_denode.c +++ b/sys/msdosfs/msdosfs_denode.c @@ -130,21 +130,21 @@ msdosfs_hashget(dev, dirclust, diroff) struct vnode *vp; loop: - mtx_enter(&dehash_mtx, MTX_DEF); + mtx_lock(&dehash_mtx); for (dep = DEHASH(dev, dirclust, diroff); dep; dep = dep->de_next) { if (dirclust == dep->de_dirclust && diroff == dep->de_diroffset && dev == dep->de_dev && dep->de_refcnt != 0) { vp = DETOV(dep); - mtx_enter(&vp->v_interlock, MTX_DEF); - mtx_exit(&dehash_mtx, MTX_DEF); + mtx_lock(&vp->v_interlock); + mtx_unlock(&dehash_mtx); if (vget(vp, LK_EXCLUSIVE | LK_INTERLOCK, p)) goto loop; return (dep); } } - mtx_exit(&dehash_mtx, MTX_DEF); + mtx_unlock(&dehash_mtx); return (NULL); } @@ -154,7 +154,7 @@ msdosfs_hashins(dep) { struct denode **depp, *deq; - mtx_enter(&dehash_mtx, MTX_DEF); + mtx_lock(&dehash_mtx); depp = &DEHASH(dep->de_dev, dep->de_dirclust, dep->de_diroffset); deq = *depp; if (deq) @@ -162,7 +162,7 @@ msdosfs_hashins(dep) dep->de_next = deq; dep->de_prev = depp; *depp = dep; - mtx_exit(&dehash_mtx, MTX_DEF); + mtx_unlock(&dehash_mtx); } static void @@ -171,7 +171,7 @@ msdosfs_hashrem(dep) { struct denode *deq; - mtx_enter(&dehash_mtx, MTX_DEF); + mtx_lock(&dehash_mtx); deq = dep->de_next; if (deq) deq->de_prev = dep->de_prev; @@ -180,7 +180,7 @@ msdosfs_hashrem(dep) dep->de_next = NULL; dep->de_prev = NULL; #endif - mtx_exit(&dehash_mtx, MTX_DEF); + mtx_unlock(&dehash_mtx); } /* diff --git a/sys/msdosfs/msdosfs_vfsops.c b/sys/msdosfs/msdosfs_vfsops.c index 449d691..3088d7a 100644 --- a/sys/msdosfs/msdosfs_vfsops.c +++ b/sys/msdosfs/msdosfs_vfsops.c @@ -862,7 +862,7 @@ msdosfs_sync(mp, waitfor, cred, p) /* * Write back each (modified) denode. */ - mtx_enter(&mntvnode_mtx, MTX_DEF); + mtx_lock(&mntvnode_mtx); loop: for (vp = LIST_FIRST(&mp->mnt_vnodelist); vp != NULL; vp = nvp) { /* @@ -872,20 +872,20 @@ loop: if (vp->v_mount != mp) goto loop; - mtx_enter(&vp->v_interlock, MTX_DEF); + mtx_lock(&vp->v_interlock); nvp = LIST_NEXT(vp, v_mntvnodes); dep = VTODE(vp); if (vp->v_type == VNON || ((dep->de_flag & (DE_ACCESS | DE_CREATE | DE_UPDATE | DE_MODIFIED)) == 0 && (TAILQ_EMPTY(&vp->v_dirtyblkhd) || waitfor == MNT_LAZY))) { - mtx_exit(&vp->v_interlock, MTX_DEF); + mtx_unlock(&vp->v_interlock); continue; } - mtx_exit(&mntvnode_mtx, MTX_DEF); + mtx_unlock(&mntvnode_mtx); error = vget(vp, LK_EXCLUSIVE | LK_NOWAIT | LK_INTERLOCK, p); if (error) { - mtx_enter(&mntvnode_mtx, MTX_DEF); + mtx_lock(&mntvnode_mtx); if (error == ENOENT) goto loop; continue; @@ -895,9 +895,9 @@ loop: allerror = error; VOP_UNLOCK(vp, 0, p); vrele(vp); - mtx_enter(&mntvnode_mtx, MTX_DEF); + mtx_lock(&mntvnode_mtx); } - mtx_exit(&mntvnode_mtx, MTX_DEF); + mtx_unlock(&mntvnode_mtx); /* * Flush filesystem control info. diff --git a/sys/msdosfs/msdosfs_vnops.c b/sys/msdosfs/msdosfs_vnops.c index e4052f7..fb7b83d 100644 --- a/sys/msdosfs/msdosfs_vnops.c +++ b/sys/msdosfs/msdosfs_vnops.c @@ -233,12 +233,12 @@ msdosfs_close(ap) struct denode *dep = VTODE(vp); struct timespec ts; - mtx_enter(&vp->v_interlock, MTX_DEF); + mtx_lock(&vp->v_interlock); if (vp->v_usecount > 1) { getnanotime(&ts); DETIMES(dep, &ts, &ts, &ts); } - mtx_exit(&vp->v_interlock, MTX_DEF); + mtx_unlock(&vp->v_interlock); return 0; } |