diff --git a/sys/kern/vfs_cache.c b/sys/kern/vfs_cache.c index 5b0cd64146ad..b23a58d462e2 100644 --- a/sys/kern/vfs_cache.c +++ b/sys/kern/vfs_cache.c @@ -5334,6 +5334,7 @@ cache_fplookup_symlink(struct cache_fpl *fpl) struct nameidata *ndp; struct componentname *cnp; struct vnode *dvp, *tvp; + struct pwd *pwd; int error; ndp = fpl->ndp; @@ -5379,7 +5380,9 @@ cache_fplookup_symlink(struct cache_fpl *fpl) if (*(cnp->cn_nameptr) == '/') { fpl->dvp = cache_fpl_handle_root(fpl); fpl->dvp_seqc = vn_seqc_read_any(fpl->dvp); - if (seqc_in_modify(fpl->dvp_seqc)) { + pwd = *(fpl->pwd); + if (seqc_in_modify(fpl->dvp_seqc) || + pwd->pwd_adir != pwd->pwd_rdir) { return (cache_fpl_aborted(fpl)); } /*