diff options
-rw-r--r-- | sys/fs/nullfs/null_vnops.c | 8 | ||||
-rw-r--r-- | sys/miscfs/nullfs/null_vnops.c | 8 |
2 files changed, 10 insertions, 6 deletions
diff --git a/sys/fs/nullfs/null_vnops.c b/sys/fs/nullfs/null_vnops.c index 9c15f9d..7ce4bd2 100644 --- a/sys/fs/nullfs/null_vnops.c +++ b/sys/fs/nullfs/null_vnops.c @@ -625,7 +625,7 @@ null_lock(ap) if (lvp == NULL) return (lockmgr(&vp->v_lock, flags, &vp->v_interlock, p)); if (flags & LK_INTERLOCK) { - simple_unlock(&vp->v_interlock); + mtx_exit(&vp->v_interlock, MTX_DEF); flags &= ~LK_INTERLOCK; } if ((flags & LK_TYPE_MASK) == LK_DRAIN) { @@ -671,8 +671,10 @@ null_unlock(ap) if (lvp == NULL) return (lockmgr(&vp->v_lock, flags | LK_RELEASE, &vp->v_interlock, p)); if ((flags & LK_THISLAYER) == 0) { - if (flags & LK_INTERLOCK) - simple_unlock(&vp->v_interlock); + if (flags & LK_INTERLOCK) { + mtx_exit(&vp->v_interlock, MTX_DEF); + flags &= ~LK_INTERLOCK; + } VOP_UNLOCK(lvp, flags & ~LK_INTERLOCK, p); } else flags &= ~LK_THISLAYER; diff --git a/sys/miscfs/nullfs/null_vnops.c b/sys/miscfs/nullfs/null_vnops.c index 9c15f9d..7ce4bd2 100644 --- a/sys/miscfs/nullfs/null_vnops.c +++ b/sys/miscfs/nullfs/null_vnops.c @@ -625,7 +625,7 @@ null_lock(ap) if (lvp == NULL) return (lockmgr(&vp->v_lock, flags, &vp->v_interlock, p)); if (flags & LK_INTERLOCK) { - simple_unlock(&vp->v_interlock); + mtx_exit(&vp->v_interlock, MTX_DEF); flags &= ~LK_INTERLOCK; } if ((flags & LK_TYPE_MASK) == LK_DRAIN) { @@ -671,8 +671,10 @@ null_unlock(ap) if (lvp == NULL) return (lockmgr(&vp->v_lock, flags | LK_RELEASE, &vp->v_interlock, p)); if ((flags & LK_THISLAYER) == 0) { - if (flags & LK_INTERLOCK) - simple_unlock(&vp->v_interlock); + if (flags & LK_INTERLOCK) { + mtx_exit(&vp->v_interlock, MTX_DEF); + flags &= ~LK_INTERLOCK; + } VOP_UNLOCK(lvp, flags & ~LK_INTERLOCK, p); } else flags &= ~LK_THISLAYER; |