Page MenuHomeFreeBSD

extattr_list_vp: Only take shared vnode lock
ClosedPublic

Authored by cem on Feb 5 2019, 1:51 AM.

Details

Summary

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>

Test Plan

Suggestions welcome

Diff Detail

Repository
rS FreeBSD src repository
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

cem created this revision.Feb 5 2019, 1:51 AM
kib accepted this revision.Feb 5 2019, 2:08 AM
This revision is now accepted and ready to land.Feb 5 2019, 2:08 AM
mjg accepted this revision.Feb 5 2019, 3:27 AM

Lock acquisition can be moved few lines later, after branching on data. Similarly, unlock can be done earlier.

cem added a comment.Feb 5 2019, 3:31 AM
In D19082#408030, @mjg wrote:

Lock acquisition can be moved few lines later, after branching on data. Similarly, unlock can be done earlier.

Ok, will do.

This revision was automatically updated to reflect the committed changes.