Page MenuHomeFreeBSD

fusefs: fix two bugs regarding fcntl file locks
ClosedPublic

Authored by asomers on Mar 3 2021, 3:31 AM.
Tags
None
Referenced Files
F131553122: D29031.id85036.diff
Thu, Oct 9, 5:04 AM
F131551750: D29031.diff
Thu, Oct 9, 4:46 AM
Unknown Object (File)
Tue, Sep 30, 11:41 PM
Unknown Object (File)
Sun, Sep 28, 9:53 PM
Unknown Object (File)
Thu, Sep 11, 1:07 AM
Unknown Object (File)
Sep 5 2025, 5:48 AM
Unknown Object (File)
Sep 1 2025, 6:17 AM
Unknown Object (File)
Aug 27 2025, 11:08 AM

Details

Summary
  1. F_SETLKW (blocking) operations would be sent to the FUSE server as F_SETLK (non-blocking).
  1. Release operations, F_SETLK with lk_type = F_UNLCK, would simply return EINVAL.

PR: 253500
Reported by: John Millikin <jmillikin@gmail.com>
MFC after: 2 weeks

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 37819
Build 34708: arc lint + arc unit

Event Timeline

Um, what do you mean by that, @cem ?

sys/fs/fuse/fuse_vnops.c
447

I don't see where flags gets used later, so I suspect this is a dead store and can simply be removed -- fl->l_type should already be correct from the caller, so this should just be a matter of translating op to FUSE_SETLK AFAICT

sys/fs/fuse/fuse_vnops.c
447

Good catch.

  • Remove redundant variable assignment
This revision is now accepted and ready to land.Mar 18 2021, 8:02 PM