diff --git a/sys/kern/vfs_cache.c b/sys/kern/vfs_cache.c index 313879cf6d1f..14e148b2f839 100644 --- a/sys/kern/vfs_cache.c +++ b/sys/kern/vfs_cache.c @@ -4784,13 +4784,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)) {