The branch main has been updated by mjg:

URL: 
https://cgit.FreeBSD.org/src/commit/?id=22eb66d961dc919538e0a418e7ad97c89aa4ac5b

commit 22eb66d961dc919538e0a418e7ad97c89aa4ac5b
Author:     Mateusz Guzik <[email protected]>
AuthorDate: 2023-03-23 23:27:54 +0000
Commit:     Mateusz Guzik <[email protected]>
CommitDate: 2023-03-25 21:57:55 +0000

    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) {

Reply via email to