Since the mountlist is now a circular queue, adjust the names of the

queue members used and also add a check to see when we've wrapped
around again.
This commit is contained in:
Jordan K. Hubbard 1995-08-11 20:49:26 +00:00
parent 7fe369dc9c
commit 4cdd3a4069
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=10031

View File

@ -727,8 +727,9 @@ kinfo_vnodes(avnodes)
bp = vbuf; bp = vbuf;
evbuf = vbuf + (numvnodes + 20) * (VPTRSZ + VNODESZ); evbuf = vbuf + (numvnodes + 20) * (VPTRSZ + VNODESZ);
KGET(V_MOUNTLIST, mountlist); KGET(V_MOUNTLIST, mountlist);
for (num = 0, mp = mountlist.tqh_first; for (num = 0, mp = mountlist.cqh_first;
mp != NULL; mp = mp->mnt_list.tqe_next) { mp != NULL && !(num && mp == mountlist.cqh_first);
mp = mp->mnt_list.cqe_next) {
KGET2(mp, &mount, sizeof(mount), "mount entry"); KGET2(mp, &mount, sizeof(mount), "mount entry");
for (vp = mount.mnt_vnodelist.lh_first; for (vp = mount.mnt_vnodelist.lh_first;
vp != NULL; vp = vp->v_mntvnodes.le_next) { vp != NULL; vp = vp->v_mntvnodes.le_next) {