Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 5 Feb 2019 03:32:59 +0000 (UTC)
From:      Conrad Meyer <cem@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r343761 - head/sys/kern
Message-ID:  <201902050332.x153WxsN086038@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: cem
Date: Tue Feb  5 03:32:58 2019
New Revision: 343761
URL: https://svnweb.freebsd.org/changeset/base/343761

Log:
  extattr_list_vp: Only take shared vnode lock
  
  List is a 'read'-type operation that does not modify shared state; it's safe
  for multiple thread to proceed concurrently.  This is reflected in the vnode
  operation LISTEXTATTR locking protocol specification, which only requires a
  shared lock.
  
  (Similar to previous r248933.)
  
  Reported by:	Case van Rij <case.vanrij AT isilon.com>
  Reviewed by:	kib, mjg
  Sponsored by:	Dell EMC Isilon
  Differential Revision:	https://reviews.freebsd.org/D19082

Modified:
  head/sys/kern/vfs_extattr.c

Modified: head/sys/kern/vfs_extattr.c
==============================================================================
--- head/sys/kern/vfs_extattr.c	Tue Feb  5 03:01:10 2019	(r343760)
+++ head/sys/kern/vfs_extattr.c	Tue Feb  5 03:32:58 2019	(r343761)
@@ -633,7 +633,7 @@ extattr_list_vp(struct vnode *vp, int attrnamespace, v
 	if (nbytes > IOSIZE_MAX)
 		return (EINVAL);
 
-	vn_lock(vp, LK_EXCLUSIVE | LK_RETRY);
+	vn_lock(vp, LK_SHARED | LK_RETRY);
 
 	auiop = NULL;
 	sizep = NULL;



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