Initialize bp->b_offset before calling VOP_[SPEC]STRATEGY()

This commit is contained in:
phk 2003-10-18 11:08:04 +00:00
parent a4e276b47f
commit 0502229a3e
6 changed files with 6 additions and 0 deletions

View File

@ -196,6 +196,7 @@ ext2_bmaparray(vp, bn, bnp, runp, runb)
bp->b_flags &= ~B_INVAL;
bp->b_ioflags &= ~BIO_ERROR;
vfs_busy_pages(bp, 0);
bp->b_offset = dbtob(bp->b_blkno);
VOP_STRATEGY(bp->b_vp, bp);
curproc->p_stats->p_ru.ru_inblock++; /* XXX */
error = bufwait(bp);

View File

@ -404,6 +404,7 @@ ext2_indirtrunc(ip, lbn, dbn, lastbn, level, countp)
panic("ext2_indirtrunc: bad buffer size");
bp->b_blkno = dbn;
vfs_busy_pages(bp, 0);
bp->b_offset = dbtob(bp->b_blkno);
VOP_STRATEGY(vp, bp);
error = bufwait(bp);
}

View File

@ -1484,6 +1484,7 @@ ext2_strategy(ap)
}
vp = ip->i_devvp;
bp->b_dev = vp->v_rdev;
bp->b_offset = dbtob(bp->b_blkno);
VOP_SPECSTRATEGY(vp, bp);
return (0);
}

View File

@ -196,6 +196,7 @@ ext2_bmaparray(vp, bn, bnp, runp, runb)
bp->b_flags &= ~B_INVAL;
bp->b_ioflags &= ~BIO_ERROR;
vfs_busy_pages(bp, 0);
bp->b_offset = dbtob(bp->b_blkno);
VOP_STRATEGY(bp->b_vp, bp);
curproc->p_stats->p_ru.ru_inblock++; /* XXX */
error = bufwait(bp);

View File

@ -404,6 +404,7 @@ ext2_indirtrunc(ip, lbn, dbn, lastbn, level, countp)
panic("ext2_indirtrunc: bad buffer size");
bp->b_blkno = dbn;
vfs_busy_pages(bp, 0);
bp->b_offset = dbtob(bp->b_blkno);
VOP_STRATEGY(vp, bp);
error = bufwait(bp);
}

View File

@ -1484,6 +1484,7 @@ ext2_strategy(ap)
}
vp = ip->i_devvp;
bp->b_dev = vp->v_rdev;
bp->b_offset = dbtob(bp->b_blkno);
VOP_SPECSTRATEGY(vp, bp);
return (0);
}