]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
fusefs: correctly set lock owner during FUSE_SETLK
authorAlan Somers <asomers@FreeBSD.org>
Thu, 20 May 2021 01:10:15 +0000 (19:10 -0600)
committerAlan Somers <asomers@FreeBSD.org>
Tue, 27 Jul 2021 17:34:08 +0000 (11:34 -0600)
commit7d9771228715bf2a32c7db323accecfb7f2f861c
tree79223f4178d9c246c13e04b03bde3f188979da31
parent46138f337bd803f6546d0eae8b9b0f3879ca3224
fusefs: correctly set lock owner during FUSE_SETLK

During FUSE_SETLK, the owner field should uniquely identify the calling
process.  The fusefs module now sets it to the process's pid.
Previously, it expected the calling process to set it directly, which
was wrong.

libfuse also apparently expects the owner field to be set during
FUSE_GETLK, though I'm not sure why.

PR: 256005
Reported by: Agata <chogata@moosefs.pro>
Reviewed by: pfg
Differential Revision: https://reviews.freebsd.org/D30622

(cherry picked from commit 18b19f8c6e04935a63a951afe0e540674bc94455)
sys/fs/fuse/fuse_vnops.c
tests/sys/fs/fusefs/locks.cc