vfs: replace some spelled out VNASSERTs with VNPASS
nfc
This commit is contained in:
parent
978013a094
commit
e5eb1d298f
@ -1650,8 +1650,7 @@ vtryrecycle(struct vnode *vp)
|
||||
struct mount *vnmp;
|
||||
|
||||
CTR2(KTR_VFS, "%s: vp %p", __func__, vp);
|
||||
VNASSERT(vp->v_holdcnt, vp,
|
||||
("vtryrecycle: Recycling vp %p without a reference.", vp));
|
||||
VNPASS(vp->v_holdcnt > 0, vp);
|
||||
/*
|
||||
* This vnode may found and locked via some other list, if so we
|
||||
* can't recycle it yet.
|
||||
@ -3194,14 +3193,13 @@ vdefer_inactive(struct vnode *vp)
|
||||
{
|
||||
|
||||
ASSERT_VI_LOCKED(vp, __func__);
|
||||
VNASSERT(vp->v_holdcnt > 0, vp,
|
||||
("%s: vnode without hold count", __func__));
|
||||
VNPASS(vp->v_holdcnt > 0, vp);
|
||||
if (VN_IS_DOOMED(vp)) {
|
||||
vdropl(vp);
|
||||
return;
|
||||
}
|
||||
if (vp->v_iflag & VI_DEFINACT) {
|
||||
VNASSERT(vp->v_holdcnt > 1, vp, ("lost hold count"));
|
||||
VNPASS(vp->v_holdcnt > 1, vp);
|
||||
vdropl(vp);
|
||||
return;
|
||||
}
|
||||
@ -3545,8 +3543,7 @@ vdbatch_enqueue(struct vnode *vp)
|
||||
struct vdbatch *vd;
|
||||
|
||||
ASSERT_VI_LOCKED(vp, __func__);
|
||||
VNASSERT(!VN_IS_DOOMED(vp), vp,
|
||||
("%s: deferring requeue of a doomed vnode", __func__));
|
||||
VNPASS(!VN_IS_DOOMED(vp), vp);
|
||||
|
||||
if (vp->v_dbatchcpu != NOCPU) {
|
||||
VI_UNLOCK(vp);
|
||||
@ -3584,8 +3581,7 @@ vdbatch_dequeue(struct vnode *vp)
|
||||
int i;
|
||||
short cpu;
|
||||
|
||||
VNASSERT(vp->v_type == VBAD || vp->v_type == VNON, vp,
|
||||
("%s: called for a used vnode\n", __func__));
|
||||
VNPASS(vp->v_type == VBAD || vp->v_type == VNON, vp);
|
||||
|
||||
cpu = vp->v_dbatchcpu;
|
||||
if (cpu == NOCPU)
|
||||
@ -3737,8 +3733,7 @@ vinactivef(struct vnode *vp)
|
||||
|
||||
ASSERT_VOP_ELOCKED(vp, "vinactive");
|
||||
ASSERT_VI_LOCKED(vp, "vinactive");
|
||||
VNASSERT((vp->v_iflag & VI_DOINGINACT) == 0, vp,
|
||||
("vinactive: recursed on VI_DOINGINACT"));
|
||||
VNPASS((vp->v_iflag & VI_DOINGINACT) == 0, vp);
|
||||
CTR2(KTR_VFS, "%s: vp %p", __func__, vp);
|
||||
vp->v_iflag |= VI_DOINGINACT;
|
||||
vp->v_iflag &= ~VI_OWEINACT;
|
||||
@ -3761,8 +3756,7 @@ vinactivef(struct vnode *vp)
|
||||
}
|
||||
error = VOP_INACTIVE(vp);
|
||||
VI_LOCK(vp);
|
||||
VNASSERT(vp->v_iflag & VI_DOINGINACT, vp,
|
||||
("vinactive: lost VI_DOINGINACT"));
|
||||
VNPASS(vp->v_iflag & VI_DOINGINACT, vp);
|
||||
vp->v_iflag &= ~VI_DOINGINACT;
|
||||
return (error);
|
||||
}
|
||||
@ -4766,7 +4760,7 @@ vfs_deferred_inactive(struct vnode *vp, int lkflags)
|
||||
{
|
||||
|
||||
ASSERT_VI_LOCKED(vp, __func__);
|
||||
VNASSERT((vp->v_iflag & VI_DEFINACT) == 0, vp, ("VI_DEFINACT still set"));
|
||||
VNPASS((vp->v_iflag & VI_DEFINACT) == 0, vp);
|
||||
if ((vp->v_iflag & VI_OWEINACT) == 0) {
|
||||
vdropl(vp);
|
||||
return;
|
||||
@ -6376,7 +6370,7 @@ vfs_emptydir(struct vnode *vp)
|
||||
eof = 0;
|
||||
|
||||
ASSERT_VOP_LOCKED(vp, "vfs_emptydir");
|
||||
VNASSERT(vp->v_type == VDIR, vp, ("vp is not a directory"));
|
||||
VNPASS(vp->v_type == VDIR, vp);
|
||||
|
||||
dirent = malloc(sizeof(struct dirent), M_TEMP, M_WAITOK);
|
||||
iov.iov_base = dirent;
|
||||
|
Loading…
Reference in New Issue
Block a user