diff --git a/sys/kern/vfs_cache.c b/sys/kern/vfs_cache.c --- a/sys/kern/vfs_cache.c +++ b/sys/kern/vfs_cache.c @@ -5426,12 +5426,14 @@ struct nameidata *ndp; struct componentname *cnp; struct vnode *dvp, *tvp; + struct pwd *pwd; int error; ndp = fpl->ndp; cnp = fpl->cnp; dvp = fpl->dvp; tvp = fpl->tvp; + pwd = *(fpl->pwd); if (cache_fpl_islastcn(ndp)) { if ((cnp->cn_flags & FOLLOW) == 0) { @@ -5487,6 +5489,9 @@ cache_fpl_checkpoint(fpl); return (cache_fpl_partial(fpl)); } + if (__predict_false(pwd->pwd_adir != pwd->pwd_rdir)) { + return (cache_fpl_aborted(fpl)); + } } return (0); }