svn commit: r343761 - head/sys/kern
Conrad Meyer
cem at FreeBSD.org
Tue Feb 5 03:32:59 UTC 2019
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;
More information about the svn-src-all
mailing list