diff options
Diffstat (limited to 'sys/gnu')
-rw-r--r-- | sys/gnu/ext2fs/ext2_ihash.c | 20 | ||||
-rw-r--r-- | sys/gnu/ext2fs/ext2_vfsops.c | 26 | ||||
-rw-r--r-- | sys/gnu/fs/ext2fs/ext2_vfsops.c | 26 |
3 files changed, 36 insertions, 36 deletions
diff --git a/sys/gnu/ext2fs/ext2_ihash.c b/sys/gnu/ext2fs/ext2_ihash.c index 6866a23..1fd39e9 100644 --- a/sys/gnu/ext2fs/ext2_ihash.c +++ b/sys/gnu/ext2fs/ext2_ihash.c @@ -77,11 +77,11 @@ ufs_ihashlookup(dev, inum) { struct inode *ip; - mtx_enter(&ufs_ihash_mtx, MTX_DEF); + mtx_lock(&ufs_ihash_mtx); LIST_FOREACH(ip, INOHASH(dev, inum), i_hash) if (inum == ip->i_number && dev == ip->i_dev) break; - mtx_exit(&ufs_ihash_mtx, MTX_DEF); + mtx_unlock(&ufs_ihash_mtx); if (ip) return (ITOV(ip)); @@ -102,18 +102,18 @@ ufs_ihashget(dev, inum) struct vnode *vp; loop: - mtx_enter(&ufs_ihash_mtx, MTX_DEF); + mtx_lock(&ufs_ihash_mtx); LIST_FOREACH(ip, INOHASH(dev, inum), i_hash) { if (inum == ip->i_number && dev == ip->i_dev) { vp = ITOV(ip); - mtx_enter(&vp->v_interlock, MTX_DEF); - mtx_exit(&ufs_ihash_mtx, MTX_DEF); + mtx_lock(&vp->v_interlock); + mtx_unlock(&ufs_ihash_mtx); if (vget(vp, LK_EXCLUSIVE | LK_INTERLOCK, p)) goto loop; return (vp); } } - mtx_exit(&ufs_ihash_mtx, MTX_DEF); + mtx_unlock(&ufs_ihash_mtx); return (NULL); } @@ -130,11 +130,11 @@ ufs_ihashins(ip) /* lock the inode, then put it on the appropriate hash list */ lockmgr(&ip->i_vnode->v_lock, LK_EXCLUSIVE, (struct mtx *)0, p); - mtx_enter(&ufs_ihash_mtx, MTX_DEF); + mtx_lock(&ufs_ihash_mtx); ipp = INOHASH(ip->i_dev, ip->i_number); LIST_INSERT_HEAD(ipp, ip, i_hash); ip->i_flag |= IN_HASHED; - mtx_exit(&ufs_ihash_mtx, MTX_DEF); + mtx_unlock(&ufs_ihash_mtx); } /* @@ -144,10 +144,10 @@ void ufs_ihashrem(ip) struct inode *ip; { - mtx_enter(&ufs_ihash_mtx, MTX_DEF); + mtx_lock(&ufs_ihash_mtx); if (ip->i_flag & IN_HASHED) { ip->i_flag &= ~IN_HASHED; LIST_REMOVE(ip, i_hash); } - mtx_exit(&ufs_ihash_mtx, MTX_DEF); + mtx_unlock(&ufs_ihash_mtx); } diff --git a/sys/gnu/ext2fs/ext2_vfsops.c b/sys/gnu/ext2fs/ext2_vfsops.c index 25af8d2..5ef3819 100644 --- a/sys/gnu/ext2fs/ext2_vfsops.c +++ b/sys/gnu/ext2fs/ext2_vfsops.c @@ -561,10 +561,10 @@ ext2_reload(mountp, cred, p) brelse(bp); loop: - mtx_enter(&mntvnode_mtx, MTX_DEF); + mtx_lock(&mntvnode_mtx); for (vp = LIST_FIRST(&mountp->mnt_vnodelist); vp != NULL; vp = nvp) { if (vp->v_mount != mountp) { - mtx_exit(&mntvnode_mtx, MTX_DEF); + mtx_unlock(&mntvnode_mtx); goto loop; } nvp = LIST_NEXT(vp, v_mntvnodes); @@ -576,8 +576,8 @@ loop: /* * Step 5: invalidate all cached file data. */ - mtx_enter(&vp->v_interlock, MTX_DEF); - mtx_exit(&mntvnode_mtx, MTX_DEF); + mtx_lock(&vp->v_interlock); + mtx_unlock(&mntvnode_mtx); if (vget(vp, LK_EXCLUSIVE | LK_INTERLOCK, p)) { goto loop; } @@ -599,9 +599,9 @@ loop: &ip->i_din); brelse(bp); vput(vp); - mtx_enter(&mntvnode_mtx, MTX_DEF); + mtx_lock(&mntvnode_mtx); } - mtx_exit(&mntvnode_mtx, MTX_DEF); + mtx_unlock(&mntvnode_mtx); return (0); } @@ -918,7 +918,7 @@ ext2_sync(mp, waitfor, cred, p) /* * Write back each (modified) inode. */ - mtx_enter(&mntvnode_mtx, MTX_DEF); + mtx_lock(&mntvnode_mtx); loop: for (vp = LIST_FIRST(&mp->mnt_vnodelist); vp != NULL; vp = nvp) { /* @@ -927,20 +927,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); ip = VTOI(vp); if (vp->v_type == VNON || ((ip->i_flag & (IN_ACCESS | IN_CHANGE | IN_MODIFIED | IN_UPDATE)) == 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; @@ -949,9 +949,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); /* * Force stale file system control information to be flushed. */ diff --git a/sys/gnu/fs/ext2fs/ext2_vfsops.c b/sys/gnu/fs/ext2fs/ext2_vfsops.c index 25af8d2..5ef3819 100644 --- a/sys/gnu/fs/ext2fs/ext2_vfsops.c +++ b/sys/gnu/fs/ext2fs/ext2_vfsops.c @@ -561,10 +561,10 @@ ext2_reload(mountp, cred, p) brelse(bp); loop: - mtx_enter(&mntvnode_mtx, MTX_DEF); + mtx_lock(&mntvnode_mtx); for (vp = LIST_FIRST(&mountp->mnt_vnodelist); vp != NULL; vp = nvp) { if (vp->v_mount != mountp) { - mtx_exit(&mntvnode_mtx, MTX_DEF); + mtx_unlock(&mntvnode_mtx); goto loop; } nvp = LIST_NEXT(vp, v_mntvnodes); @@ -576,8 +576,8 @@ loop: /* * Step 5: invalidate all cached file data. */ - mtx_enter(&vp->v_interlock, MTX_DEF); - mtx_exit(&mntvnode_mtx, MTX_DEF); + mtx_lock(&vp->v_interlock); + mtx_unlock(&mntvnode_mtx); if (vget(vp, LK_EXCLUSIVE | LK_INTERLOCK, p)) { goto loop; } @@ -599,9 +599,9 @@ loop: &ip->i_din); brelse(bp); vput(vp); - mtx_enter(&mntvnode_mtx, MTX_DEF); + mtx_lock(&mntvnode_mtx); } - mtx_exit(&mntvnode_mtx, MTX_DEF); + mtx_unlock(&mntvnode_mtx); return (0); } @@ -918,7 +918,7 @@ ext2_sync(mp, waitfor, cred, p) /* * Write back each (modified) inode. */ - mtx_enter(&mntvnode_mtx, MTX_DEF); + mtx_lock(&mntvnode_mtx); loop: for (vp = LIST_FIRST(&mp->mnt_vnodelist); vp != NULL; vp = nvp) { /* @@ -927,20 +927,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); ip = VTOI(vp); if (vp->v_type == VNON || ((ip->i_flag & (IN_ACCESS | IN_CHANGE | IN_MODIFIED | IN_UPDATE)) == 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; @@ -949,9 +949,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); /* * Force stale file system control information to be flushed. */ |