Convert some if(bla) panic("foo") to KASSERTS to improve grep-ability.

This commit is contained in:
Poul-Henning Kamp 2003-10-18 09:32:39 +00:00
parent 8f559ca08e
commit 583b92e328
3 changed files with 4 additions and 8 deletions

View File

@ -799,8 +799,7 @@ static int nwfs_strategy (ap)
KASSERT(ap->a_vp == ap->a_bp->b_vp, ("%s(%p != %p)",
__func__, ap->a_vp, ap->a_bp->b_vp));
NCPVNDEBUG("\n");
if (bp->b_flags & B_PHYS)
panic("nwfs physio");
KASSERT(!(bp->b_flags & B_PHYS), ("nwfs physio"));
if (bp->b_flags & B_ASYNC)
td = (struct thread *)0;
else

View File

@ -845,8 +845,7 @@ smbfs_strategy (ap)
KASSERT(ap->a_vp == ap->a_bp->b_vp, ("%s(%p != %p)",
__func__, ap->a_vp, ap->a_bp->b_vp));
SMBVDEBUG("\n");
if (bp->b_flags & B_PHYS)
panic("smbfs physio");
KASSERT(!(bp->b_flags & B_PHYS), ("smbfs physio"));
if (bp->b_flags & B_ASYNC)
td = (struct thread *)0;
else

View File

@ -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),