diff options
author | jeff <jeff@FreeBSD.org> | 2003-10-05 07:12:38 +0000 |
---|---|---|
committer | jeff <jeff@FreeBSD.org> | 2003-10-05 07:12:38 +0000 |
commit | 2c3fea92c8d026d10b303e99639cc0b6fcad3e56 (patch) | |
tree | 28437f9a4711f644715c9a822b8efe7748cf43e2 /sys/kern/vfs_subr.c | |
parent | 57538c344f63bf635a566b5cf7a33a014320ed98 (diff) | |
download | FreeBSD-src-2c3fea92c8d026d10b303e99639cc0b6fcad3e56.zip FreeBSD-src-2c3fea92c8d026d10b303e99639cc0b6fcad3e56.tar.gz |
- 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.
Diffstat (limited to 'sys/kern/vfs_subr.c')
-rw-r--r-- | sys/kern/vfs_subr.c | 15 |
1 files changed, 2 insertions, 13 deletions
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; } |