Do the mountlist traversal the way it was done in 4.4-Lite2.

This commit is contained in:
David Greenman 1995-08-11 23:40:31 +00:00
parent 4cdd3a4069
commit d219a12e16
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=10032

View File

@ -727,9 +727,7 @@ kinfo_vnodes(avnodes)
bp = vbuf;
evbuf = vbuf + (numvnodes + 20) * (VPTRSZ + VNODESZ);
KGET(V_MOUNTLIST, mountlist);
for (num = 0, mp = mountlist.cqh_first;
mp != NULL && !(num && mp == mountlist.cqh_first);
mp = mp->mnt_list.cqe_next) {
for (num = 0, mp = mountlist.cqh_first; ; mp = mp->mnt_list.cqe_next) {
KGET2(mp, &mount, sizeof(mount), "mount entry");
for (vp = mount.mnt_vnodelist.lh_first;
vp != NULL; vp = vp->v_mntvnodes.le_next) {
@ -743,6 +741,8 @@ kinfo_vnodes(avnodes)
bp += VNODESZ;
num++;
}
if (mp == mountlist.cqh_last)
break;
}
*avnodes = num;
return ((struct e_vnode *)vbuf);