diff options
author | kan <kan@FreeBSD.org> | 2003-11-05 04:30:08 +0000 |
---|---|---|
committer | kan <kan@FreeBSD.org> | 2003-11-05 04:30:08 +0000 |
commit | 36d60f3bb735f38bbec69f4cc40ef27a24629c54 (patch) | |
tree | d6d549e791dd7c4a627af5beb25ec44a2fcdd02d /sys/fs/msdosfs | |
parent | 932794c27cf2ec2241eadf3b4891463fa9eb2432 (diff) | |
download | FreeBSD-src-36d60f3bb735f38bbec69f4cc40ef27a24629c54.zip FreeBSD-src-36d60f3bb735f38bbec69f4cc40ef27a24629c54.tar.gz |
Remove mntvnode_mtx and replace it with per-mountpoint mutex.
Introduce two new macros MNT_ILOCK(mp)/MNT_IUNLOCK(mp) to
operate on this mutex transparently.
Eventually new mutex will be protecting more fields in
struct mount, not only vnode list.
Discussed with: jeff
Diffstat (limited to 'sys/fs/msdosfs')
-rw-r--r-- | sys/fs/msdosfs/msdosfs_vfsops.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/sys/fs/msdosfs/msdosfs_vfsops.c b/sys/fs/msdosfs/msdosfs_vfsops.c index fc0e354..9e93ce3 100644 --- a/sys/fs/msdosfs/msdosfs_vfsops.c +++ b/sys/fs/msdosfs/msdosfs_vfsops.c @@ -778,7 +778,7 @@ msdosfs_sync(mp, waitfor, cred, td) /* * Write back each (modified) denode. */ - mtx_lock(&mntvnode_mtx); + MNT_ILOCK(mp); loop: for (vp = TAILQ_FIRST(&mp->mnt_nvnodelist); vp != NULL; vp = nvp) { /* @@ -794,19 +794,19 @@ loop: VI_UNLOCK(vp); continue; } - mtx_unlock(&mntvnode_mtx); + MNT_IUNLOCK(mp); 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))) { VI_UNLOCK(vp); - mtx_lock(&mntvnode_mtx); + MNT_ILOCK(mp); continue; } error = vget(vp, LK_EXCLUSIVE | LK_NOWAIT | LK_INTERLOCK, td); if (error) { - mtx_lock(&mntvnode_mtx); + MNT_ILOCK(mp); if (error == ENOENT) goto loop; continue; @@ -816,9 +816,9 @@ loop: allerror = error; VOP_UNLOCK(vp, 0, td); vrele(vp); - mtx_lock(&mntvnode_mtx); + MNT_ILOCK(mp); } - mtx_unlock(&mntvnode_mtx); + MNT_IUNLOCK(mp); /* * Flush filesystem control info. |