diff options
author | dillon <dillon@FreeBSD.org> | 2001-10-23 01:21:29 +0000 |
---|---|---|
committer | dillon <dillon@FreeBSD.org> | 2001-10-23 01:21:29 +0000 |
commit | 45a6fabe87ae3342c49f2e351d044e60daf8dfb3 (patch) | |
tree | 6c2bc2719e857145710103bb0268efdc6adaad5c /sys/gnu | |
parent | ceeb7e9e8ead9a5f69302ca1bcb726654c49b035 (diff) | |
download | FreeBSD-src-45a6fabe87ae3342c49f2e351d044e60daf8dfb3.zip FreeBSD-src-45a6fabe87ae3342c49f2e351d044e60daf8dfb3.tar.gz |
Change the vnode list under the mount point from a LIST to a TAILQ
in preparation for an implementation of limiting code for kern.maxvnodes.
MFC after: 3 days
Diffstat (limited to 'sys/gnu')
-rw-r--r-- | sys/gnu/ext2fs/ext2_vfsops.c | 9 | ||||
-rw-r--r-- | sys/gnu/fs/ext2fs/ext2_vfsops.c | 9 |
2 files changed, 10 insertions, 8 deletions
diff --git a/sys/gnu/ext2fs/ext2_vfsops.c b/sys/gnu/ext2fs/ext2_vfsops.c index 713a0cb..4d9ea28 100644 --- a/sys/gnu/ext2fs/ext2_vfsops.c +++ b/sys/gnu/ext2fs/ext2_vfsops.c @@ -141,6 +141,7 @@ ext2_mountroot() } mp = bsd_malloc((u_long)sizeof(struct mount), M_MOUNT, M_WAITOK); bzero((char *)mp, (u_long)sizeof(struct mount)); + TAILQ_INIT(&mp->mnt_nvnodelist); mp->mnt_op = &ext2fs_vfsops; mp->mnt_flag = MNT_RDONLY; if (error = ext2_mountfs(rootvp, mp, td)) { @@ -568,12 +569,12 @@ ext2_reload(mountp, cred, td) loop: mtx_lock(&mntvnode_mtx); - for (vp = LIST_FIRST(&mountp->mnt_vnodelist); vp != NULL; vp = nvp) { + for (vp = TAILQ_FIRST(&mountp->mnt_nvnodelist); vp != NULL; vp = nvp) { if (vp->v_mount != mountp) { mtx_unlock(&mntvnode_mtx); goto loop; } - nvp = LIST_NEXT(vp, v_mntvnodes); + nvp = TAILQ_NEXT(vp, v_nmntvnodes); mtx_unlock(&mntvnode_mtx); /* * Step 4: invalidate all inactive vnodes. @@ -926,14 +927,14 @@ ext2_sync(mp, waitfor, cred, td) */ mtx_lock(&mntvnode_mtx); loop: - for (vp = LIST_FIRST(&mp->mnt_vnodelist); vp != NULL; vp = nvp) { + for (vp = TAILQ_FIRST(&mp->mnt_nvnodelist); vp != NULL; vp = nvp) { /* * If the vnode that we are about to sync is no longer * associated with this mount point, start over. */ if (vp->v_mount != mp) goto loop; - nvp = LIST_NEXT(vp, v_mntvnodes); + nvp = TAILQ_NEXT(vp, v_nmntvnodes); mtx_unlock(&mntvnode_mtx); mtx_lock(&vp->v_interlock); ip = VTOI(vp); diff --git a/sys/gnu/fs/ext2fs/ext2_vfsops.c b/sys/gnu/fs/ext2fs/ext2_vfsops.c index 713a0cb..4d9ea28 100644 --- a/sys/gnu/fs/ext2fs/ext2_vfsops.c +++ b/sys/gnu/fs/ext2fs/ext2_vfsops.c @@ -141,6 +141,7 @@ ext2_mountroot() } mp = bsd_malloc((u_long)sizeof(struct mount), M_MOUNT, M_WAITOK); bzero((char *)mp, (u_long)sizeof(struct mount)); + TAILQ_INIT(&mp->mnt_nvnodelist); mp->mnt_op = &ext2fs_vfsops; mp->mnt_flag = MNT_RDONLY; if (error = ext2_mountfs(rootvp, mp, td)) { @@ -568,12 +569,12 @@ ext2_reload(mountp, cred, td) loop: mtx_lock(&mntvnode_mtx); - for (vp = LIST_FIRST(&mountp->mnt_vnodelist); vp != NULL; vp = nvp) { + for (vp = TAILQ_FIRST(&mountp->mnt_nvnodelist); vp != NULL; vp = nvp) { if (vp->v_mount != mountp) { mtx_unlock(&mntvnode_mtx); goto loop; } - nvp = LIST_NEXT(vp, v_mntvnodes); + nvp = TAILQ_NEXT(vp, v_nmntvnodes); mtx_unlock(&mntvnode_mtx); /* * Step 4: invalidate all inactive vnodes. @@ -926,14 +927,14 @@ ext2_sync(mp, waitfor, cred, td) */ mtx_lock(&mntvnode_mtx); loop: - for (vp = LIST_FIRST(&mp->mnt_vnodelist); vp != NULL; vp = nvp) { + for (vp = TAILQ_FIRST(&mp->mnt_nvnodelist); vp != NULL; vp = nvp) { /* * If the vnode that we are about to sync is no longer * associated with this mount point, start over. */ if (vp->v_mount != mp) goto loop; - nvp = LIST_NEXT(vp, v_mntvnodes); + nvp = TAILQ_NEXT(vp, v_nmntvnodes); mtx_unlock(&mntvnode_mtx); mtx_lock(&vp->v_interlock); ip = VTOI(vp); |