]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
fusefs: fix two bugs regarding fcntl file locks
authorAlan Somers <asomers@FreeBSD.org>
Thu, 18 Mar 2021 20:27:27 +0000 (14:27 -0600)
committerAlan Somers <asomers@FreeBSD.org>
Thu, 8 Apr 2021 21:33:55 +0000 (21:33 +0000)
commit9a9c9e744b51e00f3446afb922500e40845cddfa
treebacfebb482f64dad3d582872ffd97757b257efbe
parente0c4ed73f3a6a83f24d9a0bfe89f288ff1b93463
fusefs: fix two bugs regarding fcntl file locks

1) F_SETLKW (blocking) operations would be sent to the FUSE server as
   F_SETLK (non-blocking).

2) Release operations, F_SETLK with lk_type = F_UNLCK, would simply
   return EINVAL.

PR: 253500
Reported by: John Millikin <jmillikin@gmail.com>

(cherry picked from commit 929acdb19acb67cc0e6ee5439df98e28a84d4772)

fusefs: fix a dead store in fuse_vnop_advlock

kevans actually caught this in the original review and I fixed it, but
then I committed an older copy of the branch.  Whoops.

Reported by: kevans
Differential Revision: https://reviews.freebsd.org/D29031

(cherry picked from commit 9c5aac8f2e84ca4bbdf82514302c08c0453ec59b)
sys/fs/fuse/fuse_vnops.c
tests/sys/fs/fusefs/flush.cc
tests/sys/fs/fusefs/locks.cc
tests/sys/fs/fusefs/release.cc