On Tue, Jan 14, 2020 at 01:32:50PM -0500, Ted Unangst wrote:
> Alexander Bluhm wrote:
> >  loop:
> > -   TAILQ_FOREACH_SAFE(vp, &mp->mnt_vnodelist, v_mntvnodes, nvp) {
> > +   TAILQ_FOREACH(vp, &mp->mnt_vnodelist, v_mntvnodes) {
> >             if (vp->v_mount != mp)  /* Paranoia */
> >                     goto loop;
>
> that looks like an infinite loop? if there's a bad vnode on the list, it'll
> still be there next time around.

Yes, that is stupid.  We have it in multiple loops.  Should be a
kassert.  Here it was added at Sat May 5 17:07:46 1990 UTC:

https://svnweb.freebsd.org/csrg/sys/kern/vfs_subr.c?r1=41420&r2=41421&;

That was the oldest commit I have found.  From there it spreaded
over the tree.  Have to check whether a kassert fits everywhere.

bluhm

Reply via email to