Don't call VOP_BMAP on VCHR vnodes when the logical and physical block

numbers are identical: it cannot even hope to accomplish anything.
This commit is contained in:
Poul-Henning Kamp 2003-01-04 09:37:42 +00:00
parent 404a379e4a
commit 7b330b22b6

View File

@ -972,7 +972,7 @@ bdwrite(struct buf * bp)
* requesting a sync -- there might not be enough memory to do * requesting a sync -- there might not be enough memory to do
* the bmap then... So, this is important to do. * the bmap then... So, this is important to do.
*/ */
if (bp->b_lblkno == bp->b_blkno) { if (bp->b_vp->v_type != VCHR && bp->b_lblkno == bp->b_blkno) {
VOP_BMAP(bp->b_vp, bp->b_lblkno, NULL, &bp->b_blkno, NULL, NULL); VOP_BMAP(bp->b_vp, bp->b_lblkno, NULL, &bp->b_blkno, NULL, NULL);
} }