summaryrefslogtreecommitdiffstats
path: root/sys/kern/vfs_bio.c
diff options
context:
space:
mode:
authorphk <phk@FreeBSD.org>2003-01-04 09:37:42 +0000
committerphk <phk@FreeBSD.org>2003-01-04 09:37:42 +0000
commit8969090670431b2dcab448651a103e452344c03b (patch)
tree112cfb03325faa5680a49b0ed8264af3955832e4 /sys/kern/vfs_bio.c
parent864080610ecb4bdf1e559a7f65f6e149c26ede85 (diff)
downloadFreeBSD-src-8969090670431b2dcab448651a103e452344c03b.zip
FreeBSD-src-8969090670431b2dcab448651a103e452344c03b.tar.gz
Don't call VOP_BMAP on VCHR vnodes when the logical and physical block
numbers are identical: it cannot even hope to accomplish anything.
Diffstat (limited to 'sys/kern/vfs_bio.c')
-rw-r--r--sys/kern/vfs_bio.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/kern/vfs_bio.c b/sys/kern/vfs_bio.c
index cc5ee29..65fcb33 100644
--- a/sys/kern/vfs_bio.c
+++ b/sys/kern/vfs_bio.c
@@ -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);
}
OpenPOWER on IntegriCloud