mirror of
https://git.hardenedbsd.org/hardenedbsd/HardenedBSD.git
synced 2024-11-17 16:10:46 +01:00
Do the mountlist traversal the way it was done in 4.4-Lite2.
This commit is contained in:
parent
4cdd3a4069
commit
d219a12e16
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=10032
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user