mirror of
https://git.FreeBSD.org/src.git
synced 2025-01-07 13:14:51 +00:00
cache: add cache_assert_no_entries
This commit is contained in:
parent
9cf5db6369
commit
d653aaec7a
@ -2998,6 +2998,15 @@ cache_validate(struct vnode *dvp, struct vnode *vp, struct componentname *cnp)
|
||||
}
|
||||
mtx_unlock(blp);
|
||||
}
|
||||
|
||||
void
|
||||
cache_assert_no_entries(struct vnode *vp)
|
||||
{
|
||||
|
||||
VNPASS(TAILQ_EMPTY(&vp->v_cache_dst), vp);
|
||||
VNPASS(LIST_EMPTY(&vp->v_cache_src), vp);
|
||||
VNPASS(vp->v_cache_dd == NULL, vp);
|
||||
}
|
||||
#endif
|
||||
|
||||
/*
|
||||
|
@ -676,11 +676,17 @@ void cache_vop_rmdir(struct vnode *dvp, struct vnode *vp);
|
||||
#ifdef INVARIANTS
|
||||
void cache_validate(struct vnode *dvp, struct vnode *vp,
|
||||
struct componentname *cnp);
|
||||
void cache_assert_no_entries(struct vnode *vp);
|
||||
#else
|
||||
static inline void
|
||||
cache_validate(struct vnode *dvp, struct vnode *vp, struct componentname *cnp)
|
||||
{
|
||||
}
|
||||
|
||||
static inline void
|
||||
cache_assert_no_entries(struct vnode *vp)
|
||||
{
|
||||
}
|
||||
#endif
|
||||
void cache_fast_lookup_enabled_recalc(void);
|
||||
int change_dir(struct vnode *vp, struct thread *td);
|
||||
|
Loading…
Reference in New Issue
Block a user