summaryrefslogtreecommitdiff
path: root/sys/kern
diff options
context:
space:
mode:
authorArtur Grabowski <art@cvs.openbsd.org>2002-06-09 04:34:13 +0000
committerArtur Grabowski <art@cvs.openbsd.org>2002-06-09 04:34:13 +0000
commitee339c9025492ca39a6da05201aec0c315fcfac1 (patch)
tree13116fe92a6c7bc257dbcaace8e8acb65feea002 /sys/kern
parenta2cf4435005c3f192fb6cb7cb1de3a678121228c (diff)
Use LIST_FOREACH.
Diffstat (limited to 'sys/kern')
-rw-r--r--sys/kern/vfs_bio.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/sys/kern/vfs_bio.c b/sys/kern/vfs_bio.c
index 301ccb294c7..39e787680a4 100644
--- a/sys/kern/vfs_bio.c
+++ b/sys/kern/vfs_bio.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: vfs_bio.c,v 1.64 2002/06/09 01:11:18 art Exp $ */
+/* $OpenBSD: vfs_bio.c,v 1.65 2002/06/09 04:34:12 art Exp $ */
/* $NetBSD: vfs_bio.c,v 1.44 1996/06/11 11:15:36 pk Exp $ */
/*-
@@ -597,10 +597,8 @@ incore(struct vnode *vp, daddr_t blkno)
{
struct buf *bp;
- bp = BUFHASH(vp, blkno)->lh_first;
-
/* Search hash chain */
- for (; bp != NULL; bp = bp->b_hash.le_next) {
+ LIST_FOREACH(bp, BUFHASH(vp, blkno), b_hash) {
if (bp->b_lblkno == blkno && bp->b_vp == vp &&
!ISSET(bp->b_flags, B_INVAL))
return (bp);
@@ -636,8 +634,7 @@ getblk(struct vnode *vp, daddr_t blkno, int size, int slpflag, int slptimeo)
*/
bh = BUFHASH(vp, blkno);
start:
- bp = bh->lh_first;
- for (; bp != NULL; bp = bp->b_hash.le_next) {
+ LIST_FOREACH(bp, BUFHASH(vp, blkno), b_hash) {
if (bp->b_lblkno != blkno || bp->b_vp != vp)
continue;