- Fix an XXX. Check the error of vn_lock() in vflush(). Don't specify

LK_RETRY either, we don't want this vnode if it turns into another.
 - Remove the code that checks the mount point after acquiring the lock
   we are guaranteed to either fail or get the vnode that we wanted.
This commit is contained in:
jeff 2003-10-05 07:12:38 +00:00
parent 57538c344f
commit 2c3fea92c8

View File

@ -2379,19 +2379,8 @@ loop:
VI_LOCK(vp);
mtx_unlock(&mntvnode_mtx);
/*
* XXX Does not check vn_lock error. Should restart loop if
* error == ENOENT.
*/
vn_lock(vp, LK_INTERLOCK | LK_EXCLUSIVE | LK_RETRY, td);
/*
* This vnode could have been reclaimed while we were
* waiting for the lock since we are not holding a
* reference.
* Start over if the vnode was reclaimed.
*/
if (vp->v_mount != mp) {
VOP_UNLOCK(vp, 0, td);
error = vn_lock(vp, LK_INTERLOCK | LK_EXCLUSIVE, td);
if (error) {
mtx_lock(&mntvnode_mtx);
goto loop;
}