git: 400907c645ce - stable/13 - cache: extend mismatch vnode assert print to include the name

Mateusz Guzik mjg at FreeBSD.org
Sat May 22 18:23:54 UTC 2021


The branch stable/13 has been updated by mjg:

URL: https://cgit.FreeBSD.org/src/commit/?id=400907c645ce0b6e8bbd0375f4f46dd6cd2d54a1

commit 400907c645ce0b6e8bbd0375f4f46dd6cd2d54a1
Author:     Mateusz Guzik <mjg at FreeBSD.org>
AuthorDate: 2021-04-15 07:55:43 +0000
Commit:     Mateusz Guzik <mjg at FreeBSD.org>
CommitDate: 2021-05-22 18:21:28 +0000

    cache: extend mismatch vnode assert print to include the name
    
    (cherry picked from commit 4f0279e064bb163dbcc4859e409fc65dcbe8f1bf)
---
 sys/kern/vfs_cache.c | 8 ++++----
 1 file 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


More information about the dev-commits-src-all mailing list