or EX_SHLOCK. Do it by setting a vnode iflag indicating that the locking exclusive open is in progress, and not allowing F_LOCK request to make a progress until the first open finishes.
NB. Perhaps this should be enabled only for local filesystems.
Differential D28697
lockf: ensure atomicity of lockf for open(O_CREAT|O_EXCL|O_EXLOCK) kib on Feb 16 2021, 1:37 AM. Authored by Tags None Referenced Files
Subscribers
Details or EX_SHLOCK. Do it by setting a vnode iflag indicating that the locking exclusive open is in progress, and not allowing F_LOCK request to make a progress until the first open finishes. NB. Perhaps this should be enabled only for local filesystems. Peter has a test written to expose the problem.
Diff Detail
Event Timeline
Comment Actions Fix use of nd_vp instead of vp in clearing of the first_open flag.
Comment Actions Overall looks good.
|