The branch main has been updated by mjg: URL: https://cgit.FreeBSD.org/src/commit/?id=1045352f150346ba422b3a3ce6344fc694bc3aa4
commit 1045352f150346ba422b3a3ce6344fc694bc3aa4 Author: Mateusz Guzik <[email protected]> AuthorDate: 2021-10-17 08:40:16 +0000 Commit: Mateusz Guzik <[email protected]> CommitDate: 2021-10-17 08:42:47 +0000 cache: only assert on flags when dealing with EMPTYPATH Reported by: [email protected] Fixes: 7dd419cabc6bb9e0 ("cache: add empty path support") --- sys/kern/vfs_cache.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sys/kern/vfs_cache.c b/sys/kern/vfs_cache.c index c1a3b0dab1e8..656f446b7394 100644 --- a/sys/kern/vfs_cache.c +++ b/sys/kern/vfs_cache.c @@ -4787,13 +4787,14 @@ cache_fplookup_emptypath(struct cache_fpl *fpl) tvp_seqc = fpl->tvp_seqc; MPASS(*cnp->cn_pnbuf == '\0'); - MPASS((cnp->cn_flags & (LOCKPARENT | WANTPARENT)) == 0); if (__predict_false((cnp->cn_flags & EMPTYPATH) == 0)) { cache_fpl_smr_exit(fpl); return (cache_fpl_handled_error(fpl, ENOENT)); } + MPASS((cnp->cn_flags & (LOCKPARENT | WANTPARENT)) == 0); + tvs = vget_prep_smr(tvp); cache_fpl_smr_exit(fpl); if (__predict_false(tvs == VGET_NONE)) {
