diff options
-rw-r--r-- | sys/ufs/ffs/ffs_inode.c | 3 | ||||
-rw-r--r-- | sys/ufs/ffs/ffs_softdep.c | 2 |
2 files changed, 5 insertions, 0 deletions
diff --git a/sys/ufs/ffs/ffs_inode.c b/sys/ufs/ffs/ffs_inode.c index 50c20ca..a338bda 100644 --- a/sys/ufs/ffs/ffs_inode.c +++ b/sys/ufs/ffs/ffs_inode.c @@ -161,6 +161,8 @@ ffs_truncate(vp, length, flags, cred, td) fs = oip->i_fs; ump = oip->i_ump; + ASSERT_VOP_LOCKED(vp, "ffs_truncate"); + if (length < 0) return (EINVAL); /* @@ -277,6 +279,7 @@ ffs_truncate(vp, length, flags, cred, td) #endif softdep_setup_freeblocks(oip, length, needextclean ? IO_EXT | IO_NORMAL : IO_NORMAL); + ASSERT_VOP_LOCKED(vp, "ffs_truncate1"); vinvalbuf(ovp, needextclean ? 0 : V_NORMAL, td, 0, 0); vnode_pager_setsize(vp, 0); oip->i_flag |= IN_CHANGE | IN_UPDATE; diff --git a/sys/ufs/ffs/ffs_softdep.c b/sys/ufs/ffs/ffs_softdep.c index 1462ce0..2ebfa95 100644 --- a/sys/ufs/ffs/ffs_softdep.c +++ b/sys/ufs/ffs/ffs_softdep.c @@ -1842,6 +1842,7 @@ softdep_setup_allocindir_page(ip, lbn, bp, ptrno, newblkno, oldblkno, nbp) struct allocindir *aip; struct pagedep *pagedep; + ASSERT_VOP_LOCKED(ITOV(ip), "softdep_setup_allocindir_page"); aip = newallocindir(ip, ptrno, newblkno, oldblkno); ACQUIRE_LOCK(&lk); /* @@ -1871,6 +1872,7 @@ softdep_setup_allocindir_meta(nbp, ip, bp, ptrno, newblkno) { struct allocindir *aip; + ASSERT_VOP_LOCKED(ITOV(ip), "softdep_setup_allocindir_meta"); aip = newallocindir(ip, ptrno, newblkno, 0); ACQUIRE_LOCK(&lk); WORKLIST_INSERT(&nbp->b_dep, &aip->ai_list); |