aboutsummaryrefslogtreecommitdiff
path: root/sys/gnu/fs/ext2fs
diff options
context:
space:
mode:
authorMatthew Dillon <dillon@FreeBSD.org>2001-10-23 01:21:29 +0000
committerMatthew Dillon <dillon@FreeBSD.org>2001-10-23 01:21:29 +0000
commitc72ccd014de73fd63ea50101bc509fbd889a7dd5 (patch)
tree6c2bc2719e857145710103bb0268efdc6adaad5c /sys/gnu/fs/ext2fs
parent2716f76b14f17624d0c9c1343a75c8713bb21f5e (diff)
downloadsrc-c72ccd014de73fd63ea50101bc509fbd889a7dd5.tar.gz
src-c72ccd014de73fd63ea50101bc509fbd889a7dd5.zip
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
Notes
Notes: svn path=/head/; revision=85339
Diffstat (limited to 'sys/gnu/fs/ext2fs')
-rw-r--r--sys/gnu/fs/ext2fs/ext2_vfsops.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/sys/gnu/fs/ext2fs/ext2_vfsops.c b/sys/gnu/fs/ext2fs/ext2_vfsops.c
index 713a0cba946d..4d9ea28968c7 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);