diff options
author | phk <phk@FreeBSD.org> | 2004-10-26 20:13:49 +0000 |
---|---|---|
committer | phk <phk@FreeBSD.org> | 2004-10-26 20:13:49 +0000 |
commit | 2678190fba2279d62aa63ea24a5492273b2c4bce (patch) | |
tree | 239a5334a2602d94f1f03d267a58e6c550edd151 /sys/ufs | |
parent | 08b5d8832a67e4dafe7dc1a9d94e94a247254b30 (diff) | |
download | FreeBSD-src-2678190fba2279d62aa63ea24a5492273b2c4bce.zip FreeBSD-src-2678190fba2279d62aa63ea24a5492273b2c4bce.tar.gz |
KASSERT that we only get to prewrite() on writes.
Diffstat (limited to 'sys/ufs')
-rw-r--r-- | sys/ufs/ffs/ffs_softdep.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/ufs/ffs/ffs_softdep.c b/sys/ufs/ffs/ffs_softdep.c index 4ecec3c..42dfc56 100644 --- a/sys/ufs/ffs/ffs_softdep.c +++ b/sys/ufs/ffs/ffs_softdep.c @@ -3420,8 +3420,8 @@ softdep_disk_prewrite(struct vnode *vp, struct buf *bp) { int error; - if (bp->b_iocmd != BIO_WRITE) - return (0); + KASSERT(bp->b_iocmd == BIO_WRITE, + ("softdep_disk_prewrite on non-BIO_WRITE buffer")); if ((bp->b_flags & B_VALIDSUSPWRT) == 0 && bp->b_vp != NULL && bp->b_vp->v_mount != NULL && (bp->b_vp->v_mount->mnt_kern_flag & MNTK_SUSPENDED) != 0) |