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:
Andriy Gapon 2012-11-19 11:35:56 +00:00
parent c496727c54
commit ab49c952d9
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=243272

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