Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 23 Dec 2012 11:52:34 +0000 (UTC)
From:      Andriy Gapon <avg@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org
Subject:   svn commit: r244609 - stable/9/sys/kern
Message-ID:  <201212231152.qBNBqYgT085592@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201212231152.qBNBqYgT085592>