diff options
author | Artur Grabowski <art@cvs.openbsd.org> | 2002-06-09 04:34:13 +0000 |
---|---|---|
committer | Artur Grabowski <art@cvs.openbsd.org> | 2002-06-09 04:34:13 +0000 |
commit | ee339c9025492ca39a6da05201aec0c315fcfac1 (patch) | |
tree | 13116fe92a6c7bc257dbcaace8e8acb65feea002 /sys/kern | |
parent | a2cf4435005c3f192fb6cb7cb1de3a678121228c (diff) |
Use LIST_FOREACH.
Diffstat (limited to 'sys/kern')
-rw-r--r-- | sys/kern/vfs_bio.c | 9 |
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; |