summaryrefslogtreecommitdiffstats
path: root/sys
diff options
context:
space:
mode:
authordg <dg@FreeBSD.org>1995-08-24 13:59:14 +0000
committerdg <dg@FreeBSD.org>1995-08-24 13:59:14 +0000
commit05ce7ad6548f889f293ad651657402e202fb3948 (patch)
tree9ef0385292018b03450d6fd7cbd0bef2ad637760 /sys
parent71510114b29b693a49044a13f4479a4cc1005f16 (diff)
downloadFreeBSD-src-05ce7ad6548f889f293ad651657402e202fb3948.zip
FreeBSD-src-05ce7ad6548f889f293ad651657402e202fb3948.tar.gz
Another minor optimization, this time to incore().
Diffstat (limited to 'sys')
-rw-r--r--sys/kern/vfs_bio.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/sys/kern/vfs_bio.c b/sys/kern/vfs_bio.c
index 2c52f31..d2b5ba0 100644
--- a/sys/kern/vfs_bio.c
+++ b/sys/kern/vfs_bio.c
@@ -18,7 +18,7 @@
* 5. Modifications may be freely made to this file if the above conditions
* are met.
*
- * $Id: vfs_bio.c,v 1.57 1995/08/06 12:10:39 davidg Exp $
+ * $Id: vfs_bio.c,v 1.58 1995/08/24 13:28:16 davidg Exp $
*/
/*
@@ -697,9 +697,9 @@ incore(struct vnode * vp, daddr_t blkno)
bp = bh->lh_first;
/* Search hash chain */
- while (bp) {
+ while (bp != NULL) {
/* hit */
- if (bp->b_lblkno == blkno && bp->b_vp == vp &&
+ if (bp->b_vp == vp && bp->b_lblkno == blkno &&
(bp->b_flags & B_INVAL) == 0) {
splx(s);
return (bp);
@@ -708,7 +708,7 @@ incore(struct vnode * vp, daddr_t blkno)
}
splx(s);
- return (0);
+ return (NULL);
}
/*
@@ -726,9 +726,9 @@ inmem(struct vnode * vp, daddr_t blkno)
if (incore(vp, blkno))
return 1;
- if (vp->v_mount == 0)
+ if (vp->v_mount == NULL)
return 0;
- if ((vp->v_object == 0) || (vp->v_flag & VVMIO) == 0)
+ if ((vp->v_object == NULL) || (vp->v_flag & VVMIO) == 0)
return 0;
obj = vp->v_object;
OpenPOWER on IntegriCloud