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

Matthew D Fleming mdf at FreeBSD.org
Sat May 4 18:44:15 UTC 2013


Author: mdf
Date: Sat May  4 18:44:14 2013
New Revision: 250248
URL: http://svnweb.freebsd.org/changeset/base/250248

Log:
  MFC r248933:
  
  Use a shared lock for VOP_GETEXTATTR, as it is a read-like operation.

Modified:
  stable/9/sys/kern/vfs_extattr.c
  stable/9/sys/kern/vfs_vnops.c
Directory Properties:
  stable/9/sys/   (props changed)
  stable/9/sys/amd64/include/xen/   (props changed)
  stable/9/sys/boot/   (props changed)
  stable/9/sys/boot/i386/efi/   (props changed)
  stable/9/sys/boot/ia64/efi/   (props changed)
  stable/9/sys/boot/ia64/ski/   (props changed)
  stable/9/sys/boot/powerpc/boot1.chrp/   (props changed)
  stable/9/sys/boot/powerpc/ofw/   (props changed)
  stable/9/sys/cddl/contrib/opensolaris/   (props changed)
  stable/9/sys/conf/   (props changed)
  stable/9/sys/contrib/dev/acpica/   (props changed)
  stable/9/sys/contrib/octeon-sdk/   (props changed)
  stable/9/sys/contrib/pf/   (props changed)
  stable/9/sys/contrib/x86emu/   (props changed)
  stable/9/sys/dev/   (props changed)
  stable/9/sys/dev/e1000/   (props changed)
  stable/9/sys/dev/isp/   (props changed)
  stable/9/sys/dev/ixgbe/   (props changed)
  stable/9/sys/dev/puc/   (props changed)
  stable/9/sys/fs/   (props changed)
  stable/9/sys/fs/ntfs/   (props changed)
  stable/9/sys/modules/   (props changed)
  stable/9/sys/net/   (props changed)
  stable/9/sys/sys/   (props changed)

Modified: stable/9/sys/kern/vfs_extattr.c
==============================================================================
--- stable/9/sys/kern/vfs_extattr.c	Sat May  4 18:38:16 2013	(r250247)
+++ stable/9/sys/kern/vfs_extattr.c	Sat May  4 18:44:14 2013	(r250248)
@@ -339,7 +339,7 @@ extattr_get_vp(struct vnode *vp, int att
 	int error;
 
 	VFS_ASSERT_GIANT(vp->v_mount);
-	vn_lock(vp, LK_EXCLUSIVE | LK_RETRY);
+	vn_lock(vp, LK_SHARED | LK_RETRY);
 
 	/*
 	 * Slightly unusual semantics: if the user provides a NULL data

Modified: stable/9/sys/kern/vfs_vnops.c
==============================================================================
--- stable/9/sys/kern/vfs_vnops.c	Sat May  4 18:38:16 2013	(r250247)
+++ stable/9/sys/kern/vfs_vnops.c	Sat May  4 18:44:14 2013	(r250248)
@@ -1744,7 +1744,7 @@ vn_extattr_get(struct vnode *vp, int iof
 	auio.uio_resid = *buflen;
 
 	if ((ioflg & IO_NODELOCKED) == 0)
-		vn_lock(vp, LK_EXCLUSIVE | LK_RETRY);
+		vn_lock(vp, LK_SHARED | LK_RETRY);
 
 	ASSERT_VOP_LOCKED(vp, "IO_NODELOCKED with no vp lock held");
 


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