diff options
author | phk <phk@FreeBSD.org> | 2003-08-17 23:00:30 +0000 |
---|---|---|
committer | phk <phk@FreeBSD.org> | 2003-08-17 23:00:30 +0000 |
commit | cdcca2ab04b0d94fd9454304ffb1ef3c66c0bbcd (patch) | |
tree | 550f50fd783e86d4fc0432ee380e9569d5443264 /sys/fs | |
parent | e24c6c21c04ba81f74e72a73d8f97f1e1e5e53b2 (diff) | |
download | FreeBSD-src-cdcca2ab04b0d94fd9454304ffb1ef3c66c0bbcd.zip FreeBSD-src-cdcca2ab04b0d94fd9454304ffb1ef3c66c0bbcd.tar.gz |
Do not call VOP_BMAP() on our own vnodes.
It is particularly silly when all it does is a minor piece of math.
Diffstat (limited to 'sys/fs')
-rw-r--r-- | sys/fs/cd9660/cd9660_lookup.c | 13 |
1 files changed, 3 insertions, 10 deletions
diff --git a/sys/fs/cd9660/cd9660_lookup.c b/sys/fs/cd9660/cd9660_lookup.c index cc2fa8c..056e893 100644 --- a/sys/fs/cd9660/cd9660_lookup.c +++ b/sys/fs/cd9660/cd9660_lookup.c @@ -410,12 +410,13 @@ cd9660_blkatoff(vp, offset, res, bpp) register struct iso_mnt *imp; struct buf *bp; daddr_t lbn; - int bsize, error; + int bsize, bshift, error; ip = VTOI(vp); imp = ip->i_mnt; lbn = lblkno(imp, offset); bsize = blksize(imp, ip, lbn); + bshift = imp->im_bshift; if ((error = bread(vp, lbn, bsize, NOCRED, &bp)) != 0) { brelse(bp); @@ -433,15 +434,7 @@ cd9660_blkatoff(vp, offset, res, bpp) * reconstituted buffer will have no knowledge of b_blkno. */ if (bp->b_blkno == bp->b_lblkno) { - error = VOP_BMAP(vp, bp->b_lblkno, NULL, - &bp->b_blkno, NULL, NULL); - if (error) { - bp->b_error = error; - bp->b_ioflags |= BIO_ERROR; - brelse(bp); - *bpp = NULL; - return (error); - } + bp->b_blkno = (ip->iso_start + bp->b_lblkno) << (bshift - DEV_BSHIFT); } if (res) |