On Thu, Mar 18, 2021 at 6:09 PM Alan Somers <asom...@freebsd.org> wrote: > > The branch main has been updated by asomers: > > URL: > https://cgit.FreeBSD.org/src/commit/?id=929acdb19acb67cc0e6ee5439df98e28a84d4772 > > commit 929acdb19acb67cc0e6ee5439df98e28a84d4772 > Author: Alan Somers <asom...@freebsd.org> > AuthorDate: 2021-03-18 20:27:27 +0000 > Commit: Alan Somers <asom...@freebsd.org> > CommitDate: 2021-03-18 23:09:10 +0000 > > 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 <jmilli...@gmail.com> > MFC after: 2 weeks > --- > sys/fs/fuse/fuse_vnops.c | 10 +++++++--- > tests/sys/fs/fusefs/flush.cc | 12 ++++++++++- > tests/sys/fs/fusefs/locks.cc | 45 > +++++++++++++++++++++++++++++++++++++++++- > tests/sys/fs/fusefs/release.cc | 12 ++++++++++- > 4 files changed, 73 insertions(+), 6 deletions(-) > > diff --git a/sys/fs/fuse/fuse_vnops.c b/sys/fs/fuse/fuse_vnops.c > index 5bbde1e278c9..cdbc42f5adf4 100644 > --- a/sys/fs/fuse/fuse_vnops.c > +++ b/sys/fs/fuse/fuse_vnops.c > @@ -437,10 +437,14 @@ fuse_vnop_advlock(struct vop_advlock_args *ap) > op = FUSE_GETLK; > break; > case F_SETLK: > - op = FUSE_SETLK; > + if (flags & F_WAIT) > + op = FUSE_SETLKW; > + else > + op = FUSE_SETLK; > break; > - case F_SETLKW: > - op = FUSE_SETLKW; > + case F_UNLCK: > + op = FUSE_SETLK; > + flags |= F_UNLCK; > break; > default: > return EINVAL;
Hi, The committed version of this appears to have brought back the redundant assignment to `flags` Thanks, Kyle Evans _______________________________________________ dev-commits-src-main@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/dev-commits-src-main To unsubscribe, send any mail to "dev-commits-src-main-unsubscr...@freebsd.org"