assert_vop_locked should treat LK_EXCLOTHER as the not locked case

... from a perspective of the current thread.

Spotted by:	mjg
Discussed with:	kib
MFC after:	18 days
This commit is contained in:
avg 2012-11-19 11:35:56 +00:00
parent 4d2c561ebf
commit 4726ba44fc

View File

@ -3988,7 +3988,8 @@ void
assert_vop_locked(struct vnode *vp, const char *str)
{
if (!IGNORE_LOCK(vp) && VOP_ISLOCKED(vp) == 0)
if (!IGNORE_LOCK(vp) &&
(VOP_ISLOCKED(vp) == 0 || VOP_ISLOCKED(vp) == LK_EXCLOTHER))
vfs_badlock("is not locked but should be", str, vp);
}