From 22eb66d961dc919538e0a418e7ad97c89aa4ac5b Mon Sep 17 00:00:00 2001 From: Mateusz Guzik Date: Thu, 23 Mar 2023 23:27:54 +0000 Subject: [PATCH] vfs cache: always assert on ndp->ni_resflags --- sys/kern/vfs_cache.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/kern/vfs_cache.c b/sys/kern/vfs_cache.c index e716113e6085..cc93158078d3 100644 --- a/sys/kern/vfs_cache.c +++ b/sys/kern/vfs_cache.c @@ -6148,6 +6148,7 @@ cache_fplookup(struct nameidata *ndp, enum cache_fpl_status *status, ("%s: internal flags found in cn_flags %" PRIx64, __func__, cnp->cn_flags)); MPASS(cnp->cn_nameptr == cnp->cn_pnbuf); + MPASS(ndp->ni_resflags == 0); if (__predict_false(!cache_can_fplookup(&fpl))) { *status = fpl.status; @@ -6172,7 +6173,6 @@ cache_fplookup(struct nameidata *ndp, enum cache_fpl_status *status, if (cnp->cn_pnbuf[0] == '/') { dvp = cache_fpl_handle_root(&fpl); - MPASS(ndp->ni_resflags == 0); ndp->ni_resflags = NIRES_ABS; } else { if (ndp->ni_dirfd == AT_FDCWD) {