diff options
author | Konstantin Belousov <kib@FreeBSD.org> | 2009-04-10 10:22:44 +0000 |
---|---|---|
committer | Konstantin Belousov <kib@FreeBSD.org> | 2009-04-10 10:22:44 +0000 |
commit | 3f54086eba4a1df9981cee3e8f94a3b2b652c205 (patch) | |
tree | 1d4aba80f8d00165dcc019427b677a38db46a9e7 /sys/kern/vfs_cache.c | |
parent | 6d7e80912385a084d2634e557751d8a4e025a8aa (diff) | |
download | src-3f54086eba4a1df9981cee3e8f94a3b2b652c205.tar.gz src-3f54086eba4a1df9981cee3e8f94a3b2b652c205.zip |
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
Notes
Notes:
svn path=/head/; revision=190887
Diffstat (limited to 'sys/kern/vfs_cache.c')
-rw-r--r-- | sys/kern/vfs_cache.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/sys/kern/vfs_cache.c b/sys/kern/vfs_cache.c index 49eccdd0e2f7..6172f5b92a48 100644 --- a/sys/kern/vfs_cache.c +++ b/sys/kern/vfs_cache.c @@ -554,8 +554,15 @@ success: 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; |