mirror of
https://git.FreeBSD.org/src.git
synced 2024-10-19 02:29:40 +00:00
cache: improve vnode vs name assertion in cache_enter_time
(cherry picked from commit 1d65a9b47e
)
This commit is contained in:
parent
807c4914a5
commit
d6132e2117
@ -2387,18 +2387,21 @@ cache_enter_time(struct vnode *dvp, struct vnode *vp, struct componentname *cnp,
|
||||
KASSERT(cnp->cn_namelen <= NAME_MAX,
|
||||
("%s: passed len %ld exceeds NAME_MAX (%d)", __func__, cnp->cn_namelen,
|
||||
NAME_MAX));
|
||||
#ifdef notyet
|
||||
/*
|
||||
* Not everything doing this is weeded out yet.
|
||||
*/
|
||||
VNPASS(dvp != vp, dvp);
|
||||
#endif
|
||||
VNPASS(!VN_IS_DOOMED(dvp), dvp);
|
||||
VNPASS(dvp->v_type != VNON, dvp);
|
||||
if (vp != NULL) {
|
||||
VNPASS(!VN_IS_DOOMED(vp), vp);
|
||||
VNPASS(vp->v_type != VNON, vp);
|
||||
}
|
||||
if (cnp->cn_namelen == 1 && cnp->cn_nameptr[0] == '.') {
|
||||
KASSERT(dvp == vp,
|
||||
("%s: different vnodes for dot entry (%p; %p)\n", __func__,
|
||||
dvp, vp));
|
||||
} else {
|
||||
KASSERT(dvp != vp,
|
||||
("%s: same vnode for non-dot entry [%s] (%p)\n", __func__,
|
||||
cnp->cn_nameptr, dvp));
|
||||
}
|
||||
|
||||
#ifdef DEBUG_CACHE
|
||||
if (__predict_false(!doingcache))
|
||||
|
Loading…
Reference in New Issue
Block a user