diff options
author | phk <phk@FreeBSD.org> | 2003-06-15 18:53:00 +0000 |
---|---|---|
committer | phk <phk@FreeBSD.org> | 2003-06-15 18:53:00 +0000 |
commit | 24cc9156fe9b5c2e779cc33134e9821873057333 (patch) | |
tree | 68a65c9d3593abaee8f4a7c6f0b683e5d30c43fe /sys/ufs | |
parent | 69776c10822e68c24101edbb82aec156257044a9 (diff) | |
download | FreeBSD-src-24cc9156fe9b5c2e779cc33134e9821873057333.zip FreeBSD-src-24cc9156fe9b5c2e779cc33134e9821873057333.tar.gz |
Add the same KASSERT to all VOP_STRATEGY and VOP_SPECSTRATEGY implementations
to check that the buffer points to the correct vnode.
Diffstat (limited to 'sys/ufs')
-rw-r--r-- | sys/ufs/ffs/ffs_vnops.c | 2 | ||||
-rw-r--r-- | sys/ufs/ufs/ufs_vnops.c | 2 |
2 files changed, 4 insertions, 0 deletions
diff --git a/sys/ufs/ffs/ffs_vnops.c b/sys/ufs/ffs/ffs_vnops.c index 53dfc41..7652a02 100644 --- a/sys/ufs/ffs/ffs_vnops.c +++ b/sys/ufs/ffs/ffs_vnops.c @@ -1384,6 +1384,8 @@ struct vop_strategy_args { struct vnode *vp; daddr_t lbn; + KASSERT(ap->a_vp == ap->a_bp->b_vp, ("%s(%p != %p)", + __func__, ap->a_vp, ap->a_bp->b_vp)); vp = ap->a_vp; lbn = ap->a_bp->b_lblkno; if (VTOI(vp)->i_fs->fs_magic == FS_UFS2_MAGIC && diff --git a/sys/ufs/ufs/ufs_vnops.c b/sys/ufs/ufs/ufs_vnops.c index 4f02ead..964a468 100644 --- a/sys/ufs/ufs/ufs_vnops.c +++ b/sys/ufs/ufs/ufs_vnops.c @@ -1949,6 +1949,8 @@ ufs_strategy(ap) ufs2_daddr_t blkno; int error; + KASSERT(ap->a_vp == ap->a_bp->b_vp, ("%s(%p != %p)", + __func__, ap->a_vp, ap->a_bp->b_vp)); ip = VTOI(vp); if (bp->b_blkno == bp->b_lblkno) { error = ufs_bmaparray(vp, bp->b_lblkno, &blkno, bp, NULL, NULL); |