From 2c3fea92c8d026d10b303e99639cc0b6fcad3e56 Mon Sep 17 00:00:00 2001 From: jeff Date: Sun, 5 Oct 2003 07:12:38 +0000 Subject: - 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. --- sys/kern/vfs_subr.c | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-) (limited to 'sys/kern/vfs_subr.c') diff --git a/sys/kern/vfs_subr.c b/sys/kern/vfs_subr.c index 9d578b6..38ee1c7 100644 --- a/sys/kern/vfs_subr.c +++ b/sys/kern/vfs_subr.c @@ -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; } -- cgit v1.1