From owner-freebsd-current Sun Dec 31 17:53:43 2000 From owner-freebsd-current@FreeBSD.ORG Sun Dec 31 17:53:41 2000 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from pike.osd.bsdi.com (pike.osd.bsdi.com [204.216.28.222]) by hub.freebsd.org (Postfix) with ESMTP id 1DBB237B400 for ; Sun, 31 Dec 2000 17:53:41 -0800 (PST) Received: from foo.osd.bsdi.com (root@foo.osd.bsdi.com [204.216.28.137]) by pike.osd.bsdi.com (8.11.1/8.9.3) with ESMTP id f011rKh40034; Sun, 31 Dec 2000 17:53:20 -0800 (PST) (envelope-from jhb@foo.osd.bsdi.com) Received: (from jhb@localhost) by foo.osd.bsdi.com (8.11.1/8.11.0) id f011reT22357; Sun, 31 Dec 2000 17:53:40 -0800 (PST) (envelope-from jhb) Message-ID: X-Mailer: XFMail 1.4.0 on FreeBSD X-Priority: 3 (Normal) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 8bit MIME-Version: 1.0 In-Reply-To: <200012302342.eBUNgW142476@earth.backplane.com> Date: Sun, 31 Dec 2000 17:53:40 -0800 (PST) Organization: BSD, Inc. From: John Baldwin To: Matt Dillon Subject: Re: Current hangs... Cc: current@FreeBSD.ORG Sender: jhb@foo.osd.bsdi.com Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On 30-Dec-00 Matt Dillon wrote: > #include > @@ -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 -- 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 majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message