diff options
author | phk <phk@FreeBSD.org> | 1999-11-16 10:56:05 +0000 |
---|---|---|
committer | phk <phk@FreeBSD.org> | 1999-11-16 10:56:05 +0000 |
commit | 8fca18de89986d6275d0502af100b97274c4bab5 (patch) | |
tree | d8a3cb26e484830479c8386ecba6b7d0157acc06 /sys/kern/vfs_bio.c | |
parent | 520fff788fc8f2154247a6cff986abf634fdbb51 (diff) | |
download | FreeBSD-src-8fca18de89986d6275d0502af100b97274c4bab5.zip FreeBSD-src-8fca18de89986d6275d0502af100b97274c4bab5.tar.gz |
This is a partial commit of the patch from PR 14914:
Alot of the code in sys/kern directly accesses the *Q_HEAD and *Q_ENTRY
structures for list operations. This patch makes all list operations
in sys/kern use the queue(3) macros, rather than directly accessing the
*Q_{HEAD,ENTRY} structures.
This batch of changes compile to the same object files.
Reviewed by: phk
Submitted by: Jake Burkholder <jake@checker.org>
PR: 14914
Diffstat (limited to 'sys/kern/vfs_bio.c')
-rw-r--r-- | sys/kern/vfs_bio.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/sys/kern/vfs_bio.c b/sys/kern/vfs_bio.c index 8563bf0..af1d835 100644 --- a/sys/kern/vfs_bio.c +++ b/sys/kern/vfs_bio.c @@ -1225,16 +1225,14 @@ gbincore(struct vnode * vp, daddr_t blkno) struct bufhashhdr *bh; bh = bufhash(vp, blkno); - bp = bh->lh_first; /* Search hash chain */ - while (bp != NULL) { + LIST_FOREACH(bp, bh, b_hash) { /* hit */ if (bp->b_vp == vp && bp->b_lblkno == blkno && (bp->b_flags & B_INVAL) == 0) { break; } - bp = bp->b_hash.le_next; } return (bp); } |