Fix null_lock() not unlocking vp->v_interlock if LK_THISLAYER.

Reviewed by:	bp@FreeBSD.org
MFC after:	1 week
This commit is contained in:
Semen Ustimenko 2002-05-21 18:07:33 +00:00
parent 69cc776cd6
commit 96b825e7ca

View File

@ -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);