svn commit: r243272 - head/sys/kern

Andriy Gapon avg at FreeBSD.org
Mon Nov 19 11:35:57 UTC 2012


Author: avg
Date: Mon Nov 19 11:35:56 2012
New Revision: 243272
URL: http://svnweb.freebsd.org/changeset/base/243272

Log:
  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

Modified:
  head/sys/kern/vfs_subr.c

Modified: head/sys/kern/vfs_subr.c
==============================================================================
--- head/sys/kern/vfs_subr.c	Mon Nov 19 11:32:56 2012	(r243271)
+++ head/sys/kern/vfs_subr.c	Mon Nov 19 11:35:56 2012	(r243272)
@@ -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);
 }
 


More information about the svn-src-head mailing list