Date: Mon, 11 Oct 2021 09:15:55 GMT From: Mateusz Guzik <mjg@FreeBSD.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Subject: git: 0e89914326ec - stable/13 - vfs: hoist cn_thread assert in namei Message-ID: <202110110915.19B9FtIk009632@gitrepo.freebsd.org>
next in thread | raw e-mail | index | archive | help
The branch stable/13 has been updated by mjg: URL: https://cgit.FreeBSD.org/src/commit/?id=0e89914326ec11d4c1685e8ecb14f6349ea8f591 commit 0e89914326ec11d4c1685e8ecb14f6349ea8f591 Author: Mateusz Guzik <mjg@FreeBSD.org> AuthorDate: 2021-10-01 21:13:38 +0000 Commit: Mateusz Guzik <mjg@FreeBSD.org> CommitDate: 2021-10-11 09:13:35 +0000 vfs: hoist cn_thread assert in namei Making it condtional on whether ktrace happens to be enabled makes no sense. (cherry picked from commit c9536389d732feecf61afa4632397d67b04b2ab4) --- sys/kern/vfs_lookup.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/kern/vfs_lookup.c b/sys/kern/vfs_lookup.c index a827c87538b8..454a10175e1b 100644 --- a/sys/kern/vfs_lookup.c +++ b/sys/kern/vfs_lookup.c @@ -556,6 +556,8 @@ namei(struct nameidata *ndp) cnp = &ndp->ni_cnd; td = cnp->cn_thread; #ifdef INVARIANTS + KASSERT(cnp->cn_thread == curthread, + ("namei not using curthread")); KASSERT((ndp->ni_debugflags & NAMEI_DBG_CALLED) == 0, ("%s: repeated call to namei without NDREINIT", __func__)); KASSERT(ndp->ni_debugflags == NAMEI_DBG_INITED, @@ -610,8 +612,6 @@ namei(struct nameidata *ndp) #ifdef KTRACE if (KTRPOINT(td, KTR_NAMEI)) { - KASSERT(cnp->cn_thread == curthread, - ("namei not using curthread")); ktrnamei(cnp->cn_pnbuf); } #endif
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202110110915.19B9FtIk009632>