Cache_lookup() for DOTDOT drops dvp vnode lock, allowing dvp to be reclaimed.
Check the condition and return ENOENT then. In nfs_lookup(), respect ENOENT return from cache_lookup() when it is caused by dvp reclaim. Reported and tested by: pho
This commit is contained in:
parent
6d7e809123
commit
3f54086eba
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=190887
@ -554,8 +554,15 @@ cache_lookup(dvp, vpp, cnp)
|
||||
else
|
||||
CACHE_RUNLOCK();
|
||||
error = vget(*vpp, cnp->cn_lkflags | LK_INTERLOCK, cnp->cn_thread);
|
||||
if (cnp->cn_flags & ISDOTDOT)
|
||||
if (cnp->cn_flags & ISDOTDOT) {
|
||||
vn_lock(dvp, ltype | LK_RETRY);
|
||||
if (dvp->v_iflag & VI_DOOMED) {
|
||||
if (error == 0)
|
||||
vput(*vpp);
|
||||
*vpp = NULL;
|
||||
return (ENOENT);
|
||||
}
|
||||
}
|
||||
if (error) {
|
||||
*vpp = NULL;
|
||||
goto retry;
|
||||
|
@ -978,6 +978,8 @@ nfs_lookup(struct vop_lookup_args *ap)
|
||||
vrele(newvp);
|
||||
*vpp = NULLVP;
|
||||
} else if (error == ENOENT) {
|
||||
if (dvp->v_iflag & VI_DOOMED)
|
||||
return (ENOENT);
|
||||
/*
|
||||
* We only accept a negative hit in the cache if the
|
||||
* modification time of the parent directory matches
|
||||
|
Loading…
Reference in New Issue
Block a user