On 30-Dec-00 Matt Dillon wrote:
> #include <sys/param.h>
> @@ -352,12 +352,25 @@
> return (0);
>
> /*
> + * MARK/SCAN initialization to avoid infinite loops
> + */
> + s = splbio();
> + for (bp = TAILQ_FIRST(&vp->v_dirtyblkhd); bp;
> + bp = TAILQ_NEXT(bp, b_vnbufs)) {
> + bp->b_flags &= ~B_SCANNED;
> + }
> + splx(s);
Why not this:
s = splbio();
TAILQ_FOREACH(bp, &vp->v_dirtyblkhd, b_vnbufs) {
bp->b_flags &= ~B_SCANNED;
}
We do have foreach queue(3) macros. :)
--
John Baldwin <[EMAIL PROTECTED]> -- http://www.FreeBSD.org/~jhb/
PGP Key: http://www.Baldwin.cx/~john/pgpkey.asc
"Power Users Use the Power to Serve!" - http://www.FreeBSD.org/
To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message