diff options
author | Miod Vallat <miod@cvs.openbsd.org> | 2006-03-05 21:48:58 +0000 |
---|---|---|
committer | Miod Vallat <miod@cvs.openbsd.org> | 2006-03-05 21:48:58 +0000 |
commit | 52f635294dc2220b27898d3db1703c9464b92fb1 (patch) | |
tree | 5c2d6cca90a4bcc953c4c704201e7c2d7c08188e /sys/kern/spec_vnops.c | |
parent | 84fa77ca902d7934ca42a7fdd806497b643a8421 (diff) |
Use more queue macros rather than doing it by hand; ok otto@ krw@
Diffstat (limited to 'sys/kern/spec_vnops.c')
-rw-r--r-- | sys/kern/spec_vnops.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/sys/kern/spec_vnops.c b/sys/kern/spec_vnops.c index 7e4a2f070f1..1f3fe5db55f 100644 --- a/sys/kern/spec_vnops.c +++ b/sys/kern/spec_vnops.c @@ -1,4 +1,4 @@ -/* $OpenBSD: spec_vnops.c,v 1.32 2006/02/20 19:44:58 miod Exp $ */ +/* $OpenBSD: spec_vnops.c,v 1.33 2006/03/05 21:48:56 miod Exp $ */ /* $NetBSD: spec_vnops.c,v 1.29 1996/04/22 01:42:38 christos Exp $ */ /* @@ -511,8 +511,9 @@ spec_fsync(v) */ loop: s = splbio(); - for (bp = vp->v_dirtyblkhd.lh_first; bp; bp = nbp) { - nbp = bp->b_vnbufs.le_next; + for (bp = LIST_FIRST(&vp->v_dirtyblkhd); + bp != LIST_END(&vp->v_dirtyblkhd); bp = nbp) { + nbp = LIST_NEXT(bp, b_vnbufs); if ((bp->b_flags & B_BUSY)) continue; if ((bp->b_flags & B_DELWRI) == 0) @@ -527,7 +528,7 @@ loop: vwaitforio (vp, 0, "spec_fsync", 0); #ifdef DIAGNOSTIC - if (vp->v_dirtyblkhd.lh_first) { + if (!LIST_EMPTY(&vp->v_dirtyblkhd)) { splx(s); vprint("spec_fsync: dirty", vp); goto loop; |