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
This commit is contained in:
Conrad Meyer 2019-02-05 03:32:58 +00:00
parent 334fd3dabc
commit c3eb848ce3
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=343761

View File

@ -633,7 +633,7 @@ extattr_list_vp(struct vnode *vp, int attrnamespace, void *data,
if (nbytes > IOSIZE_MAX)
return (EINVAL);
vn_lock(vp, LK_EXCLUSIVE | LK_RETRY);
vn_lock(vp, LK_SHARED | LK_RETRY);
auiop = NULL;
sizep = NULL;