Fix up various vnode-related asserts which did not dump the used vnode
This commit is contained in:
parent
7877018c2c
commit
f1fa1ba3d0
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=357446
@ -479,8 +479,7 @@ devfs_allocv(struct devfs_dirent *de, struct mount *mp, int lockmode,
|
||||
dev_refl(dev);
|
||||
/* XXX: v_rdev should be protect by vnode lock */
|
||||
vp->v_rdev = dev;
|
||||
KASSERT(vp->v_usecount == 1,
|
||||
("%s %d (%d)\n", __func__, __LINE__, vp->v_usecount));
|
||||
VNPASS(vp->v_usecount == 1, vp);
|
||||
dev->si_usecount++;
|
||||
/* Special casing of ttys for deadfs. Probably redundant. */
|
||||
dsw = dev->si_devsw;
|
||||
|
@ -209,7 +209,7 @@ null_nodeget(mp, lowervp, vpp)
|
||||
int error;
|
||||
|
||||
ASSERT_VOP_LOCKED(lowervp, "lowervp");
|
||||
KASSERT(lowervp->v_usecount >= 1, ("Unreferenced vnode %p", lowervp));
|
||||
VNPASS(lowervp->v_usecount > 0, lowervp);
|
||||
|
||||
/* Lookup the hash firstly. */
|
||||
*vpp = null_hashget(mp, lowervp);
|
||||
|
@ -2859,10 +2859,8 @@ vfs_vmio_iodone(struct buf *bp)
|
||||
REFCOUNT_COUNT(obj->paging_in_progress), bp->b_npages));
|
||||
|
||||
vp = bp->b_vp;
|
||||
KASSERT(vp->v_holdcnt > 0,
|
||||
("vfs_vmio_iodone: vnode %p has zero hold count", vp));
|
||||
KASSERT(vp->v_object != NULL,
|
||||
("vfs_vmio_iodone: vnode %p has no vm_object", vp));
|
||||
VNPASS(vp->v_holdcnt > 0, vp);
|
||||
VNPASS(vp->v_object != NULL, vp);
|
||||
|
||||
foff = bp->b_offset;
|
||||
KASSERT(bp->b_offset != NOOFFSET,
|
||||
|
@ -441,8 +441,7 @@ ffs_lock(ap)
|
||||
flags = ap->a_flags;
|
||||
for (;;) {
|
||||
#ifdef DEBUG_VFS_LOCKS
|
||||
KASSERT(vp->v_holdcnt != 0,
|
||||
("ffs_lock %p: zero hold count", vp));
|
||||
VNPASS(vp->v_holdcnt != 0, vp);
|
||||
#endif
|
||||
lkp = vp->v_vnlock;
|
||||
result = _lockmgr_args(lkp, flags, VI_MTX(vp),
|
||||
|
@ -248,7 +248,7 @@ vnode_pager_alloc(void *handle, vm_ooffset_t size, vm_prot_t prot,
|
||||
|
||||
vp = (struct vnode *)handle;
|
||||
ASSERT_VOP_LOCKED(vp, "vnode_pager_alloc");
|
||||
KASSERT(vp->v_usecount != 0, ("vnode_pager_alloc: no vnode reference"));
|
||||
VNPASS(vp->v_usecount > 0, vp);
|
||||
retry:
|
||||
object = vp->v_object;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user