summaryrefslogtreecommitdiffstats
path: root/sys/kern/vfs_bio.c
diff options
context:
space:
mode:
authorphk <phk@FreeBSD.org>2003-10-18 09:32:39 +0000
committerphk <phk@FreeBSD.org>2003-10-18 09:32:39 +0000
commit6b528c791125260313d635e198e09e508261a4b2 (patch)
tree9f39edf0ca06f624d6d63d567ac1d7ee24e08f87 /sys/kern/vfs_bio.c
parent715845d8e6015fb0f0e79b90a68c3c543ec5e546 (diff)
downloadFreeBSD-src-6b528c791125260313d635e198e09e508261a4b2.zip
FreeBSD-src-6b528c791125260313d635e198e09e508261a4b2.tar.gz
Convert some if(bla) panic("foo") to KASSERTS to improve grep-ability.
Diffstat (limited to 'sys/kern/vfs_bio.c')
-rw-r--r--sys/kern/vfs_bio.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/sys/kern/vfs_bio.c b/sys/kern/vfs_bio.c
index 939f968..ac4e47d 100644
--- a/sys/kern/vfs_bio.c
+++ b/sys/kern/vfs_bio.c
@@ -3688,8 +3688,7 @@ vmapbuf(struct buf *bp)
GIANT_REQUIRED;
- if ((bp->b_flags & B_PHYS) == 0)
- panic("vmapbuf");
+ KASSERT(bp->b_flags & B_PHYS, ("vmapbuf"));
if (bp->b_bufsize < 0)
return (-1);
prot = (bp->b_iocmd == BIO_READ) ? VM_PROT_READ | VM_PROT_WRITE :
@@ -3744,8 +3743,7 @@ vunmapbuf(struct buf *bp)
GIANT_REQUIRED;
- if ((bp->b_flags & B_PHYS) == 0)
- panic("vunmapbuf");
+ KASSERT(bp->b_flags & B_PHYS, ("vunmapbuf"));
npages = bp->b_npages;
pmap_qremove(trunc_page((vm_offset_t)bp->b_data),
OpenPOWER on IntegriCloud