diff options
-rw-r--r-- | sys/kern/vfs_subr.c | 22 | ||||
-rw-r--r-- | sys/kern/vfs_vnops.c | 5 |
2 files changed, 9 insertions, 18 deletions
diff --git a/sys/kern/vfs_subr.c b/sys/kern/vfs_subr.c index 96f902a..2193635 100644 --- a/sys/kern/vfs_subr.c +++ b/sys/kern/vfs_subr.c @@ -739,10 +739,9 @@ vcanrecycle(struct vnode *vp) /* We should be able to immediately acquire this */ /* XXX This looks like it should panic if it fails */ - if (vn_lock(vp, LK_INTERLOCK | LK_EXCLUSIVE, td) != 0) { - VI_UNLOCK(vp); + if (vn_lock(vp, LK_INTERLOCK | LK_EXCLUSIVE, td) != 0) return (EWOULDBLOCK); - } + /* * Don't recycle if we still have cached pages. */ @@ -1917,18 +1916,11 @@ vget(vp, flags, td) */ if ((flags & LK_INTERLOCK) == 0) VI_LOCK(vp); - if (vp->v_iflag & VI_XLOCK) { - if (vp->v_vxproc == curthread) { -#if 0 - /* this can now occur in normal operation */ - log(LOG_INFO, "VXLOCK interlock avoided\n"); -#endif - } else { - vp->v_iflag |= VI_XWANT; - msleep(vp, VI_MTX(vp), PINOD | PDROP, "vget", 0); - mp_fixme("interlock not released."); - return (ENOENT); - } + if (vp->v_iflag & VI_XLOCK && vp->v_vxproc != curthread) { + vp->v_iflag |= VI_XWANT; + msleep(vp, VI_MTX(vp), PINOD | PDROP, "vget", 0); + VI_UNLOCK(vp); + return (ENOENT); } vp->v_usecount++; diff --git a/sys/kern/vfs_vnops.c b/sys/kern/vfs_vnops.c index 5be404b..43683e0 100644 --- a/sys/kern/vfs_vnops.c +++ b/sys/kern/vfs_vnops.c @@ -853,10 +853,9 @@ debug_vn_lock(vp, flags, td, filename, line) msleep(vp, VI_MTX(vp), PINOD | PDROP, "vn_lock", 0); /* - * Since we're just going to return, unlock interlock - * if the caller didn't call us with it held. + * Since we're just going to return, unlock interlock. */ - if ((flags & (LK_INTERLOCK|LK_RETRY)) == 0) + if ((flags & LK_RETRY) == 0) VI_UNLOCK(vp); error = ENOENT; } else { |