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:
phk 2003-01-04 09:37:42 +00:00
parent 864080610e
commit 8969090670

View File

@ -972,7 +972,7 @@ bdwrite(struct buf * bp)
* requesting a sync -- there might not be enough memory 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);
}