diff options
-rw-r--r-- | sys/kern/vfs_lookup.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/sys/kern/vfs_lookup.c b/sys/kern/vfs_lookup.c index 94d11f2..cf73231 100644 --- a/sys/kern/vfs_lookup.c +++ b/sys/kern/vfs_lookup.c @@ -698,6 +698,10 @@ unionlookup: VOP_ISLOCKED(dp) == LK_SHARED && (cnp->cn_flags & ISLASTCN) && (cnp->cn_flags & LOCKPARENT)) vn_lock(dp, LK_UPGRADE|LK_RETRY); + if ((dp->v_iflag & VI_DOOMED) != 0) { + error = ENOENT; + goto bad; + } /* * If we're looking up the last component and we need an exclusive * lock, adjust our lkflags. |