struct mountlist and struct mount.mnt_list have no business being

a CIRCLEQ.  Change them to TAILQ_HEAD and TAILQ_ENTRY respectively.

This removes ugly  mp != (void*)&mountlist  comparisons.

Requested by:   phk
Submitted by:   Jake Burkholder jake@checker.org
PR:             14967
This commit is contained in:
Poul-Henning Kamp 1999-11-20 10:00:46 +00:00
parent c18f2d82a5
commit 0429e37ade
20 changed files with 71 additions and 79 deletions

View File

@ -507,10 +507,9 @@ getNewVnode(vpp)
struct mount *devtomp(dev)
dev_t dev;
{
struct mount *mp, *nmp;
for (mp = mountlist.cqh_first; mp != (void*)&mountlist; mp = nmp) {
nmp = mp->mnt_list.cqe_next;
struct mount *mp;
TAILQ_FOREACH(mp, &mountlist, mnt_list) {
if (((VFSTOUFS(mp))->um_dev == dev)) {
/* mount corresponds to UFS and the device matches one we want */
return(mp);

View File

@ -4363,8 +4363,7 @@ clear_inodedeps(p)
* Ugly code to find mount point given pointer to superblock.
*/
fs = inodedep->id_fs;
for (mp = CIRCLEQ_FIRST(&mountlist); mp != (void *)&mountlist;
mp = CIRCLEQ_NEXT(mp, mnt_list))
TAILQ_FOREACH(mp, &mountlist, mnt_list)
if ((mp->mnt_flag & MNT_SOFTDEP) && fs == VFSTOUFS(mp)->um_fs)
break;
/*

View File

@ -507,10 +507,9 @@ getNewVnode(vpp)
struct mount *devtomp(dev)
dev_t dev;
{
struct mount *mp, *nmp;
for (mp = mountlist.cqh_first; mp != (void*)&mountlist; mp = nmp) {
nmp = mp->mnt_list.cqe_next;
struct mount *mp;
TAILQ_FOREACH(mp, &mountlist, mnt_list) {
if (((VFSTOUFS(mp))->um_dev == dev)) {
/* mount corresponds to UFS and the device matches one we want */
return(mp);

View File

@ -188,7 +188,7 @@ msdosfs_mountroot()
return (error);
}
CIRCLEQ_INSERT_TAIL(&mountlist, mp, mnt_list);
TAILQ_INSERT_TAIL(&mountlist, mp, mnt_list);
mp->mnt_vnodecovered = NULLVP;
(void) copystr("/", mp->mnt_stat.f_mntonname, MNAMELEN - 1,
&size);

View File

@ -144,7 +144,7 @@ ext2_mountroot()
bsd_free(mp, M_MOUNT);
return (error);
}
CIRCLEQ_INSERT_HEAD(&mountlist, mp, mnt_list);
TAILQ_INSERT_HEAD(&mountlist, mp, mnt_list);
mp->mnt_flag |= MNT_ROOTFS;
mp->mnt_vnodecovered = NULLVP;
ump = VFSTOUFS(mp);

View File

@ -144,7 +144,7 @@ ext2_mountroot()
bsd_free(mp, M_MOUNT);
return (error);
}
CIRCLEQ_INSERT_HEAD(&mountlist, mp, mnt_list);
TAILQ_INSERT_HEAD(&mountlist, mp, mnt_list);
mp->mnt_flag |= MNT_ROOTFS;
mp->mnt_vnodecovered = NULLVP;
ump = VFSTOUFS(mp);

View File

@ -447,7 +447,7 @@ xxx_vfs_root_fdtab(dummy)
register struct filedesc0 *fdp = &filedesc0;
/* Get the vnode for '/'. Set fdp->fd_fd.fd_cdir to reference it. */
if (VFS_ROOT(CIRCLEQ_FIRST(&mountlist), &rootvnode))
if (VFS_ROOT(TAILQ_FIRST(&mountlist), &rootvnode))
panic("cannot find root vnode");
fdp->fd_fd.fd_cdir = rootvnode;
VREF(fdp->fd_fd.fd_cdir);

View File

@ -229,7 +229,7 @@ boot(howto)
if (((bp->b_flags&B_INVAL) == 0 && BUF_REFCNT(bp)) ||
((bp->b_flags & (B_DELWRI|B_INVAL)) == B_DELWRI)) {
if (bp->b_dev == NODEV) {
CIRCLEQ_REMOVE(&mountlist,
TAILQ_REMOVE(&mountlist,
bp->b_vp->v_mount, mnt_list);
continue;
}

View File

@ -213,7 +213,7 @@ vfs_mountroot_try(char *mountfrom)
/* register with list of mounted filesystems */
simple_lock(&mountlist_slock);
CIRCLEQ_INSERT_HEAD(&mountlist, mp, mnt_list);
TAILQ_INSERT_HEAD(&mountlist, mp, mnt_list);
simple_unlock(&mountlist_slock);
/* sanity check system clock against root filesystem timestamp */

View File

@ -116,7 +116,7 @@ int vfs_ioopt = 0;
SYSCTL_INT(_vfs, OID_AUTO, ioopt, CTLFLAG_RW, &vfs_ioopt, 0, "");
#endif
struct mntlist mountlist; /* mounted filesystem list */
struct mntlist mountlist = TAILQ_HEAD_INITIALIZER(mountlist); /* mounted fs */
struct simplelock mountlist_slock;
struct simplelock mntvnode_slock;
int nfs_mount_type = -1;
@ -172,7 +172,6 @@ vntblinit()
TAILQ_INIT(&vnode_free_list);
TAILQ_INIT(&vnode_tobefree_list);
simple_lock_init(&vnode_free_list_slock);
CIRCLEQ_INIT(&mountlist);
vnode_zone = zinit("VNODE", sizeof (struct vnode), 0, 0, 5);
/*
* Initialize the filesystem syncer.
@ -315,7 +314,7 @@ vfs_getvfs(fsid)
register struct mount *mp;
simple_lock(&mountlist_slock);
CIRCLEQ_FOREACH(mp, &mountlist, mnt_list) {
TAILQ_FOREACH(mp, &mountlist, mnt_list) {
if (mp->mnt_stat.f_fsid.val[0] == fsid->val[0] &&
mp->mnt_stat.f_fsid.val[1] == fsid->val[1]) {
simple_unlock(&mountlist_slock);
@ -1973,9 +1972,9 @@ DB_SHOW_COMMAND(lockedvnodes, lockedvnodes)
printf("Locked vnodes\n");
simple_lock(&mountlist_slock);
for (mp = CIRCLEQ_FIRST(&mountlist); mp != (void *)&mountlist; mp = nmp) {
for (mp = TAILQ_FIRST(&mountlist); mp != NULL; mp = nmp) {
if (vfs_busy(mp, LK_NOWAIT, &mountlist_slock, p)) {
nmp = CIRCLEQ_NEXT(mp, mnt_list);
nmp = TAILQ_NEXT(mp, mnt_list);
continue;
}
LIST_FOREACH(vp, &mp->mnt_vnodelist, v_mntvnodes) {
@ -1983,7 +1982,7 @@ DB_SHOW_COMMAND(lockedvnodes, lockedvnodes)
vprint((char *)0, vp);
}
simple_lock(&mountlist_slock);
nmp = CIRCLEQ_NEXT(mp, mnt_list);
nmp = TAILQ_NEXT(mp, mnt_list);
vfs_unbusy(mp, p);
}
simple_unlock(&mountlist_slock);
@ -2091,10 +2090,9 @@ sysctl_vnode SYSCTL_HANDLER_ARGS
(numvnodes + KINFO_VNODESLOP) * (VPTRSZ + VNODESZ)));
simple_lock(&mountlist_slock);
mp = CIRCLEQ_FIRST(&mountlist);
for (; mp != (void *)&mountlist; mp = nmp) {
for (mp = TAILQ_FIRST(&mountlist); mp != NULL; mp = nmp) {
if (vfs_busy(mp, LK_NOWAIT, &mountlist_slock, p)) {
nmp = CIRCLEQ_NEXT(mp, mnt_list);
nmp = TAILQ_NEXT(mp, mnt_list);
continue;
}
again:
@ -2120,7 +2118,7 @@ sysctl_vnode SYSCTL_HANDLER_ARGS
}
simple_unlock(&mntvnode_slock);
simple_lock(&mountlist_slock);
nmp = CIRCLEQ_NEXT(mp, mnt_list);
nmp = TAILQ_NEXT(mp, mnt_list);
vfs_unbusy(mp, p);
}
simple_unlock(&mountlist_slock);
@ -2159,7 +2157,7 @@ vfs_mountedon(vp)
void
vfs_unmountall()
{
struct mount *mp, *nmp;
struct mount *mp;
struct proc *p;
int error;
@ -2170,17 +2168,19 @@ vfs_unmountall()
/*
* Since this only runs when rebooting, it is not interlocked.
*/
mp = CIRCLEQ_LAST(&mountlist);
for (; mp != (void *)&mountlist; mp = nmp) {
nmp = CIRCLEQ_PREV(mp, mnt_list);
while(!TAILQ_EMPTY(&mountlist)) {
mp = TAILQ_LAST(&mountlist, mntlist);
error = dounmount(mp, MNT_FORCE, p);
if (error) {
TAILQ_REMOVE(&mountlist, mp, mnt_list);
printf("unmount of %s failed (",
mp->mnt_stat.f_mntonname);
if (error == EBUSY)
printf("BUSY)\n");
else
printf("%d)\n", error);
} else {
/* The unmount has removed mp from the mountlist */
}
}
}

View File

@ -331,7 +331,7 @@ mount(p, uap)
vp->v_mountedhere = mp;
simple_unlock(&vp->v_interlock);
simple_lock(&mountlist_slock);
CIRCLEQ_INSERT_TAIL(&mountlist, mp, mnt_list);
TAILQ_INSERT_TAIL(&mountlist, mp, mnt_list);
simple_unlock(&mountlist_slock);
checkdirs(vp);
VOP_UNLOCK(vp, 0, p);
@ -494,7 +494,7 @@ dounmount(mp, flags, p)
wakeup((caddr_t)mp);
return (error);
}
CIRCLEQ_REMOVE(&mountlist, mp, mnt_list);
TAILQ_REMOVE(&mountlist, mp, mnt_list);
if ((coveredvp = mp->mnt_vnodecovered) != NULLVP) {
coveredvp->v_mountedhere = (struct mount *)0;
vrele(coveredvp);
@ -533,10 +533,9 @@ sync(p, uap)
int asyncflag;
simple_lock(&mountlist_slock);
mp = CIRCLEQ_FIRST(&mountlist);
for (; mp != (void *)&mountlist; mp = nmp) {
for (mp = TAILQ_FIRST(&mountlist); mp != NULL; mp = nmp) {
if (vfs_busy(mp, LK_NOWAIT, &mountlist_slock, p)) {
nmp = CIRCLEQ_NEXT(mp, mnt_list);
nmp = TAILQ_NEXT(mp, mnt_list);
continue;
}
if ((mp->mnt_flag & MNT_RDONLY) == 0) {
@ -548,7 +547,7 @@ sync(p, uap)
mp->mnt_flag |= asyncflag;
}
simple_lock(&mountlist_slock);
nmp = CIRCLEQ_NEXT(mp, mnt_list);
nmp = TAILQ_NEXT(mp, mnt_list);
vfs_unbusy(mp, p);
}
simple_unlock(&mountlist_slock);
@ -718,10 +717,9 @@ getfsstat(p, uap)
sfsp = (caddr_t)SCARG(uap, buf);
count = 0;
simple_lock(&mountlist_slock);
mp = CIRCLEQ_FIRST(&mountlist);
for (; mp != (void *)&mountlist; mp = nmp) {
for (mp = TAILQ_FIRST(&mountlist); mp != NULL; mp = nmp) {
if (vfs_busy(mp, LK_NOWAIT, &mountlist_slock, p)) {
nmp = CIRCLEQ_NEXT(mp, mnt_list);
nmp = TAILQ_NEXT(mp, mnt_list);
continue;
}
if (sfsp && count < maxcount) {
@ -735,7 +733,7 @@ getfsstat(p, uap)
(SCARG(uap, flags) & MNT_WAIT)) &&
(error = VFS_STATFS(mp, sp, p))) {
simple_lock(&mountlist_slock);
nmp = CIRCLEQ_NEXT(mp, mnt_list);
nmp = TAILQ_NEXT(mp, mnt_list);
vfs_unbusy(mp, p);
continue;
}
@ -749,7 +747,7 @@ getfsstat(p, uap)
}
count++;
simple_lock(&mountlist_slock);
nmp = CIRCLEQ_NEXT(mp, mnt_list);
nmp = TAILQ_NEXT(mp, mnt_list);
vfs_unbusy(mp, p);
}
simple_unlock(&mountlist_slock);

View File

@ -213,7 +213,7 @@ vfs_mountroot_try(char *mountfrom)
/* register with list of mounted filesystems */
simple_lock(&mountlist_slock);
CIRCLEQ_INSERT_HEAD(&mountlist, mp, mnt_list);
TAILQ_INSERT_HEAD(&mountlist, mp, mnt_list);
simple_unlock(&mountlist_slock);
/* sanity check system clock against root filesystem timestamp */

View File

@ -116,7 +116,7 @@ int vfs_ioopt = 0;
SYSCTL_INT(_vfs, OID_AUTO, ioopt, CTLFLAG_RW, &vfs_ioopt, 0, "");
#endif
struct mntlist mountlist; /* mounted filesystem list */
struct mntlist mountlist = TAILQ_HEAD_INITIALIZER(mountlist); /* mounted fs */
struct simplelock mountlist_slock;
struct simplelock mntvnode_slock;
int nfs_mount_type = -1;
@ -172,7 +172,6 @@ vntblinit()
TAILQ_INIT(&vnode_free_list);
TAILQ_INIT(&vnode_tobefree_list);
simple_lock_init(&vnode_free_list_slock);
CIRCLEQ_INIT(&mountlist);
vnode_zone = zinit("VNODE", sizeof (struct vnode), 0, 0, 5);
/*
* Initialize the filesystem syncer.
@ -315,7 +314,7 @@ vfs_getvfs(fsid)
register struct mount *mp;
simple_lock(&mountlist_slock);
CIRCLEQ_FOREACH(mp, &mountlist, mnt_list) {
TAILQ_FOREACH(mp, &mountlist, mnt_list) {
if (mp->mnt_stat.f_fsid.val[0] == fsid->val[0] &&
mp->mnt_stat.f_fsid.val[1] == fsid->val[1]) {
simple_unlock(&mountlist_slock);
@ -1973,9 +1972,9 @@ DB_SHOW_COMMAND(lockedvnodes, lockedvnodes)
printf("Locked vnodes\n");
simple_lock(&mountlist_slock);
for (mp = CIRCLEQ_FIRST(&mountlist); mp != (void *)&mountlist; mp = nmp) {
for (mp = TAILQ_FIRST(&mountlist); mp != NULL; mp = nmp) {
if (vfs_busy(mp, LK_NOWAIT, &mountlist_slock, p)) {
nmp = CIRCLEQ_NEXT(mp, mnt_list);
nmp = TAILQ_NEXT(mp, mnt_list);
continue;
}
LIST_FOREACH(vp, &mp->mnt_vnodelist, v_mntvnodes) {
@ -1983,7 +1982,7 @@ DB_SHOW_COMMAND(lockedvnodes, lockedvnodes)
vprint((char *)0, vp);
}
simple_lock(&mountlist_slock);
nmp = CIRCLEQ_NEXT(mp, mnt_list);
nmp = TAILQ_NEXT(mp, mnt_list);
vfs_unbusy(mp, p);
}
simple_unlock(&mountlist_slock);
@ -2091,10 +2090,9 @@ sysctl_vnode SYSCTL_HANDLER_ARGS
(numvnodes + KINFO_VNODESLOP) * (VPTRSZ + VNODESZ)));
simple_lock(&mountlist_slock);
mp = CIRCLEQ_FIRST(&mountlist);
for (; mp != (void *)&mountlist; mp = nmp) {
for (mp = TAILQ_FIRST(&mountlist); mp != NULL; mp = nmp) {
if (vfs_busy(mp, LK_NOWAIT, &mountlist_slock, p)) {
nmp = CIRCLEQ_NEXT(mp, mnt_list);
nmp = TAILQ_NEXT(mp, mnt_list);
continue;
}
again:
@ -2120,7 +2118,7 @@ sysctl_vnode SYSCTL_HANDLER_ARGS
}
simple_unlock(&mntvnode_slock);
simple_lock(&mountlist_slock);
nmp = CIRCLEQ_NEXT(mp, mnt_list);
nmp = TAILQ_NEXT(mp, mnt_list);
vfs_unbusy(mp, p);
}
simple_unlock(&mountlist_slock);
@ -2159,7 +2157,7 @@ vfs_mountedon(vp)
void
vfs_unmountall()
{
struct mount *mp, *nmp;
struct mount *mp;
struct proc *p;
int error;
@ -2170,17 +2168,19 @@ vfs_unmountall()
/*
* Since this only runs when rebooting, it is not interlocked.
*/
mp = CIRCLEQ_LAST(&mountlist);
for (; mp != (void *)&mountlist; mp = nmp) {
nmp = CIRCLEQ_PREV(mp, mnt_list);
while(!TAILQ_EMPTY(&mountlist)) {
mp = TAILQ_LAST(&mountlist, mntlist);
error = dounmount(mp, MNT_FORCE, p);
if (error) {
TAILQ_REMOVE(&mountlist, mp, mnt_list);
printf("unmount of %s failed (",
mp->mnt_stat.f_mntonname);
if (error == EBUSY)
printf("BUSY)\n");
else
printf("%d)\n", error);
} else {
/* The unmount has removed mp from the mountlist */
}
}
}

View File

@ -331,7 +331,7 @@ mount(p, uap)
vp->v_mountedhere = mp;
simple_unlock(&vp->v_interlock);
simple_lock(&mountlist_slock);
CIRCLEQ_INSERT_TAIL(&mountlist, mp, mnt_list);
TAILQ_INSERT_TAIL(&mountlist, mp, mnt_list);
simple_unlock(&mountlist_slock);
checkdirs(vp);
VOP_UNLOCK(vp, 0, p);
@ -494,7 +494,7 @@ dounmount(mp, flags, p)
wakeup((caddr_t)mp);
return (error);
}
CIRCLEQ_REMOVE(&mountlist, mp, mnt_list);
TAILQ_REMOVE(&mountlist, mp, mnt_list);
if ((coveredvp = mp->mnt_vnodecovered) != NULLVP) {
coveredvp->v_mountedhere = (struct mount *)0;
vrele(coveredvp);
@ -533,10 +533,9 @@ sync(p, uap)
int asyncflag;
simple_lock(&mountlist_slock);
mp = CIRCLEQ_FIRST(&mountlist);
for (; mp != (void *)&mountlist; mp = nmp) {
for (mp = TAILQ_FIRST(&mountlist); mp != NULL; mp = nmp) {
if (vfs_busy(mp, LK_NOWAIT, &mountlist_slock, p)) {
nmp = CIRCLEQ_NEXT(mp, mnt_list);
nmp = TAILQ_NEXT(mp, mnt_list);
continue;
}
if ((mp->mnt_flag & MNT_RDONLY) == 0) {
@ -548,7 +547,7 @@ sync(p, uap)
mp->mnt_flag |= asyncflag;
}
simple_lock(&mountlist_slock);
nmp = CIRCLEQ_NEXT(mp, mnt_list);
nmp = TAILQ_NEXT(mp, mnt_list);
vfs_unbusy(mp, p);
}
simple_unlock(&mountlist_slock);
@ -718,10 +717,9 @@ getfsstat(p, uap)
sfsp = (caddr_t)SCARG(uap, buf);
count = 0;
simple_lock(&mountlist_slock);
mp = CIRCLEQ_FIRST(&mountlist);
for (; mp != (void *)&mountlist; mp = nmp) {
for (mp = TAILQ_FIRST(&mountlist); mp != NULL; mp = nmp) {
if (vfs_busy(mp, LK_NOWAIT, &mountlist_slock, p)) {
nmp = CIRCLEQ_NEXT(mp, mnt_list);
nmp = TAILQ_NEXT(mp, mnt_list);
continue;
}
if (sfsp && count < maxcount) {
@ -735,7 +733,7 @@ getfsstat(p, uap)
(SCARG(uap, flags) & MNT_WAIT)) &&
(error = VFS_STATFS(mp, sp, p))) {
simple_lock(&mountlist_slock);
nmp = CIRCLEQ_NEXT(mp, mnt_list);
nmp = TAILQ_NEXT(mp, mnt_list);
vfs_unbusy(mp, p);
continue;
}
@ -749,7 +747,7 @@ getfsstat(p, uap)
}
count++;
simple_lock(&mountlist_slock);
nmp = CIRCLEQ_NEXT(mp, mnt_list);
nmp = TAILQ_NEXT(mp, mnt_list);
vfs_unbusy(mp, p);
}
simple_unlock(&mountlist_slock);

View File

@ -67,7 +67,7 @@ devfs_init(struct vfsconf *vfsp)
/* Mark a reference for the "invisible" blueprint mount */
mp->mnt_vfc->vfc_refcount++;
CIRCLEQ_INSERT_TAIL(&mountlist, mp, mnt_list);
TAILQ_INSERT_TAIL(&mountlist, mp, mnt_list);
printf("DEVFS: ready to run\n");
return 0; /*XXX*/

View File

@ -188,7 +188,7 @@ msdosfs_mountroot()
return (error);
}
CIRCLEQ_INSERT_TAIL(&mountlist, mp, mnt_list);
TAILQ_INSERT_TAIL(&mountlist, mp, mnt_list);
mp->mnt_vnodecovered = NULLVP;
(void) copystr("/", mp->mnt_stat.f_mntonname, MNAMELEN - 1,
&size);

View File

@ -1216,9 +1216,9 @@ nqnfs_lease_updatetime(deltat)
* queues.
*/
simple_lock(&mountlist_slock);
for (mp = mountlist.cqh_first; mp != (void *)&mountlist; mp = nxtmp) {
for (mp = TAILQ_FIRST(&mountlist); mp != NULL; mp = nxtmp) {
if (vfs_busy(mp, LK_NOWAIT, &mountlist_slock, p)) {
nxtmp = mp->mnt_list.cqe_next;
nxtmp = TAILQ_NEXT(mp, mnt_list);
continue;
}
if (mp->mnt_stat.f_type == nfs_mount_type) {
@ -1232,7 +1232,7 @@ nqnfs_lease_updatetime(deltat)
}
}
simple_lock(&mountlist_slock);
nxtmp = mp->mnt_list.cqe_next;
nxtmp = TAILQ_NEXT(mp, mnt_list);
vfs_unbusy(mp, p);
}
simple_unlock(&mountlist_slock);

View File

@ -97,7 +97,7 @@ struct statfs {
LIST_HEAD(vnodelst, vnode);
struct mount {
CIRCLEQ_ENTRY(mount) mnt_list; /* mount list */
TAILQ_ENTRY(mount) mnt_list; /* mount list */
struct vfsops *mnt_op; /* operations on fs */
struct vfsconf *mnt_vfc; /* configuration info */
struct vnode *mnt_vnodecovered; /* vnode we mounted on */
@ -403,7 +403,7 @@ void vfs_unbusy __P((struct mount *, struct proc *));
void vfs_unmountall __P((void));
int vfs_register __P((struct vfsconf *));
int vfs_unregister __P((struct vfsconf *));
extern CIRCLEQ_HEAD(mntlist, mount) mountlist; /* mounted filesystem list */
extern TAILQ_HEAD(mntlist, mount) mountlist; /* mounted filesystem list */
extern struct simplelock mountlist_slock;
extern struct nfs_public nfs_pub;

View File

@ -4363,8 +4363,7 @@ clear_inodedeps(p)
* Ugly code to find mount point given pointer to superblock.
*/
fs = inodedep->id_fs;
for (mp = CIRCLEQ_FIRST(&mountlist); mp != (void *)&mountlist;
mp = CIRCLEQ_NEXT(mp, mnt_list))
TAILQ_FOREACH(mp, &mountlist, mnt_list)
if ((mp->mnt_flag & MNT_SOFTDEP) && fs == VFSTOUFS(mp)->um_fs)
break;
/*

View File

@ -677,9 +677,9 @@ kinfo_vnodes(avnodes)
bp = vbuf;
evbuf = vbuf + (numvnodes + 20) * (VPTRSZ + VNODESZ);
KGET(V_MOUNTLIST, mountlist);
for (num = 0, mp = mountlist.cqh_first; ; mp = mp_next) {
for (num = 0, mp = TAILQ_FIRST(&mountlist); ; mp = mp_next) {
KGET2(mp, &mount, sizeof(mount), "mount entry");
mp_next = mount.mnt_list.cqe_next;
mp_next = TAILQ_NEXT(&mount, mnt_list);
for (vp = mount.mnt_vnodelist.lh_first;
vp != NULL; vp = vp_next) {
KGET2(vp, &vnode, sizeof(vnode), "vnode");
@ -693,7 +693,7 @@ kinfo_vnodes(avnodes)
bp += VNODESZ;
num++;
}
if (mp == mountlist.cqh_last)
if (mp == TAILQ_LAST(&mountlist, mntlist))
break;
}
*avnodes = num;