svn commit: r244609 - stable/9/sys/kern

Andriy Gapon avg at FreeBSD.org
Sun Dec 23 11:52:34 UTC 2012


Author: avg
Date: Sun Dec 23 11:52:33 2012
New Revision: 244609
URL: http://svnweb.freebsd.org/changeset/base/244609

Log:
  MFC r243272,243499: assert_vop_locked should treat LK_EXCLOTHER as the
  not locked case

Modified:
  stable/9/sys/kern/vfs_subr.c
Directory Properties:
  stable/9/sys/   (props changed)

Modified: stable/9/sys/kern/vfs_subr.c
==============================================================================
--- stable/9/sys/kern/vfs_subr.c	Sun Dec 23 11:22:18 2012	(r244608)
+++ stable/9/sys/kern/vfs_subr.c	Sun Dec 23 11:52:33 2012	(r244609)
@@ -3970,9 +3970,13 @@ assert_vi_unlocked(struct vnode *vp, con
 void
 assert_vop_locked(struct vnode *vp, const char *str)
 {
+	int locked;
 
-	if (!IGNORE_LOCK(vp) && VOP_ISLOCKED(vp) == 0)
-		vfs_badlock("is not locked but should be", str, vp);
+	if (!IGNORE_LOCK(vp)) {
+		locked = VOP_ISLOCKED(vp);
+		if (locked == 0 || locked == LK_EXCLOTHER)
+			vfs_badlock("is not locked but should be", str, vp);
+	}
 }
 
 void


More information about the svn-src-stable-9 mailing list