Do not return success and doomed vnode from lookup. LK_UPGRADE allows
the vnode to be reclaimed. Tested by: pho MFC after: 1 month
This commit is contained in:
parent
b08c9bbff4
commit
fe785ac856
@ -814,6 +814,10 @@ lookup(struct nameidata *ndp)
|
||||
if ((cnp->cn_flags & (ISLASTCN | LOCKSHARED | LOCKLEAF)) ==
|
||||
(ISLASTCN | LOCKLEAF) && VOP_ISLOCKED(dp) != LK_EXCLUSIVE) {
|
||||
vn_lock(dp, LK_UPGRADE | LK_RETRY);
|
||||
if (dp->v_iflag & VI_DOOMED) {
|
||||
error = ENOENT;
|
||||
goto bad2;
|
||||
}
|
||||
}
|
||||
if (vfslocked && dvfslocked)
|
||||
VFS_UNLOCK_GIANT(dvfslocked); /* Only need one */
|
||||
|
Loading…
Reference in New Issue
Block a user