Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 31 Oct 2011 09:22:10 +0000 (UTC)
From:      Peter Holm <pho@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
Subject:   svn commit: r226964 - stable/8/sys/fs/nullfs
Message-ID:  <201110310922.p9V9MAsF008219@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: pho
Date: Mon Oct 31 09:22:09 2011
New Revision: 226964
URL: http://svn.freebsd.org/changeset/base/226964

Log:
  MFC r226681:
  Only unlock if the lock is exclusive.
  
  PR:		kern/161956

Modified:
  stable/8/sys/fs/nullfs/null_vfsops.c
Directory Properties:
  stable/8/sys/   (props changed)
  stable/8/sys/amd64/include/xen/   (props changed)
  stable/8/sys/cddl/contrib/opensolaris/   (props changed)
  stable/8/sys/contrib/dev/acpica/   (props changed)
  stable/8/sys/contrib/pf/   (props changed)

Modified: stable/8/sys/fs/nullfs/null_vfsops.c
==============================================================================
--- stable/8/sys/fs/nullfs/null_vfsops.c	Mon Oct 31 09:18:01 2011	(r226963)
+++ stable/8/sys/fs/nullfs/null_vfsops.c	Mon Oct 31 09:22:09 2011	(r226964)
@@ -104,11 +104,10 @@ nullfs_mount(struct mount *mp)
 		return (EINVAL);
 
 	/*
-	 * Unlock lower node to avoid deadlock.
-	 * (XXX) VOP_ISLOCKED is needed?
+	 * Unlock lower node to avoid possible deadlock.
 	 */
 	if ((mp->mnt_vnodecovered->v_op == &null_vnodeops) &&
-		VOP_ISLOCKED(mp->mnt_vnodecovered)) {
+	    VOP_ISLOCKED(mp->mnt_vnodecovered) == LK_EXCLUSIVE) {
 		VOP_UNLOCK(mp->mnt_vnodecovered, 0);
 		isvnunlocked = 1;
 	}



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