Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 22 Jan 2010 15:12:01 +0000 (UTC)
From:      John Baldwin <jhb@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org
Subject:   svn commit: r202811 - stable/7/sys/kern
Message-ID:  <201001221512.o0MFC1Ne005509@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: jhb
Date: Fri Jan 22 15:12:01 2010
New Revision: 202811
URL: http://svn.freebsd.org/changeset/base/202811

Log:
  MFC 191028:
  Use a shared vnode lock for reads in vn_rdwr().

Modified:
  stable/7/sys/kern/vfs_vnops.c
Directory Properties:
  stable/7/sys/   (props changed)
  stable/7/sys/cddl/contrib/opensolaris/   (props changed)
  stable/7/sys/contrib/dev/acpica/   (props changed)
  stable/7/sys/contrib/pf/   (props changed)

Modified: stable/7/sys/kern/vfs_vnops.c
==============================================================================
--- stable/7/sys/kern/vfs_vnops.c	Fri Jan 22 14:44:15 2010	(r202810)
+++ stable/7/sys/kern/vfs_vnops.c	Fri Jan 22 15:12:01 2010	(r202811)
@@ -377,15 +377,8 @@ vn_rdwr(rw, vp, base, len, offset, segfl
 				lock_flags = LK_EXCLUSIVE;
 			}
 			vn_lock(vp, lock_flags | LK_RETRY, td);
-		} else {
-			/*
-			 * XXX This should be LK_SHARED but the VFS in releng7
-			 * needs some patches before this can be done.
-			 * The same applies to the lock_flags above and to a
-			 * similar place below.
-			 */
-			vn_lock(vp, LK_EXCLUSIVE | LK_RETRY, td);
-		}
+		} else
+			vn_lock(vp, LK_SHARED | LK_RETRY, td);
 
 	}
 	ASSERT_VOP_LOCKED(vp, "IO_NODELOCKED with no vp lock held");



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