vfs: use cache_assert_no_entries instead of open-coding it

This commit is contained in:
Mateusz Guzik 2022-10-26 15:33:47 +00:00
parent 5daf88ea5e
commit d346e3ac33

View File

@ -1906,14 +1906,13 @@ freevnode(struct vnode *vp)
VNASSERT(bo->bo_dirty.bv_cnt == 0, vp, ("dirtybufcnt not 0"));
VNASSERT(pctrie_is_empty(&bo->bo_dirty.bv_root), vp,
("dirty blk trie not empty"));
VNASSERT(TAILQ_EMPTY(&vp->v_cache_dst), vp, ("vp has namecache dst"));
VNASSERT(LIST_EMPTY(&vp->v_cache_src), vp, ("vp has namecache src"));
VNASSERT(vp->v_cache_dd == NULL, vp, ("vp has namecache for .."));
VNASSERT(TAILQ_EMPTY(&vp->v_rl.rl_waiters), vp,
("Dangling rangelock waiters"));
VNASSERT((vp->v_iflag & (VI_DOINGINACT | VI_OWEINACT)) == 0, vp,
("Leaked inactivation"));
VI_UNLOCK(vp);
cache_assert_no_entries(vp);
#ifdef MAC
mac_vnode_destroy(vp);
#endif