diff options
author | semenu <semenu@FreeBSD.org> | 2002-05-21 18:07:33 +0000 |
---|---|---|
committer | semenu <semenu@FreeBSD.org> | 2002-05-21 18:07:33 +0000 |
commit | df03dac70046c9c51920ea9d57e925f8fa86d527 (patch) | |
tree | f8e62dd5502830a6529330428ccb8c5d049d1c15 /sys/fs/nullfs | |
parent | a1b38ab0e24d8448380f251856e67f0cf834f817 (diff) | |
download | FreeBSD-src-df03dac70046c9c51920ea9d57e925f8fa86d527.zip FreeBSD-src-df03dac70046c9c51920ea9d57e925f8fa86d527.tar.gz |
Fix null_lock() not unlocking vp->v_interlock if LK_THISLAYER.
Reviewed by: bp@FreeBSD.org
MFC after: 1 week
Diffstat (limited to 'sys/fs/nullfs')
-rw-r--r-- | sys/fs/nullfs/null_vnops.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/sys/fs/nullfs/null_vnops.c b/sys/fs/nullfs/null_vnops.c index f22e870..74b1ff2 100644 --- a/sys/fs/nullfs/null_vnops.c +++ b/sys/fs/nullfs/null_vnops.c @@ -591,8 +591,12 @@ null_lock(ap) int error; if (flags & LK_THISLAYER) { - if (vp->v_vnlock != NULL) - return 0; /* lock is shared across layers */ + if (vp->v_vnlock != NULL) { + /* lock is shared across layers */ + if (flags & LK_INTERLOCK) + mtx_unlock(&vp->v_interlock); + return 0; + } error = lockmgr(&vp->v_lock, flags & ~LK_THISLAYER, &vp->v_interlock, td); return (error); |