aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMateusz Guzik <mjg@FreeBSD.org>2021-04-15 07:55:43 +0000
committerMateusz Guzik <mjg@FreeBSD.org>2021-05-22 18:21:28 +0000
commit400907c645ce0b6e8bbd0375f4f46dd6cd2d54a1 (patch)
treec106664aa31880ccb1363bdc8d5f2f517773b349
parent03aecce81c07909df196166d2cc168bf5e280a99 (diff)
downloadsrc-400907c645ce0b6e8bbd0375f4f46dd6cd2d54a1.tar.gz
src-400907c645ce0b6e8bbd0375f4f46dd6cd2d54a1.zip
cache: extend mismatch vnode assert print to include the name
(cherry picked from commit 4f0279e064bb163dbcc4859e409fc65dcbe8f1bf)
-rw-r--r--sys/kern/vfs_cache.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/sys/kern/vfs_cache.c b/sys/kern/vfs_cache.c
index 31d6668a3565..ec5bb0c39c99 100644
--- a/sys/kern/vfs_cache.c
+++ b/sys/kern/vfs_cache.c
@@ -2468,12 +2468,12 @@ cache_enter_time(struct vnode *dvp, struct vnode *vp, struct componentname *cnp,
MPASS(cache_ncp_canuse(n2));
if ((n2->nc_flag & NCF_NEGATIVE) != 0)
KASSERT(vp == NULL,
- ("%s: found entry pointing to a different vnode (%p != %p)",
- __func__, NULL, vp));
+ ("%s: found entry pointing to a different vnode (%p != %p) ; name [%s]",
+ __func__, NULL, vp, cnp->cn_nameptr));
else
KASSERT(n2->nc_vp == vp,
- ("%s: found entry pointing to a different vnode (%p != %p)",
- __func__, n2->nc_vp, vp));
+ ("%s: found entry pointing to a different vnode (%p != %p) ; name [%s]",
+ __func__, n2->nc_vp, vp, cnp->cn_nameptr));
/*
* Entries are supposed to be immutable unless in the
* process of getting destroyed. Accommodating for