[PATCH v2 0/2] filelock: fix conflict detection with userland file delegations

From: Jeff Layton

Date: Thu Dec 04 2025 - 08:49:08 EST


This patchset fixes the way that conflicts are detected when userland
requests file delegations. The problem is due to a hack that was added
long ago which worked up until userland could request a file delegation.

This fixes the bug and makes things a bit less hacky. Please consider
for v6.19.

Signed-off-by: Jeff Layton <jlayton@xxxxxxxxxx>
---
Changes in v2:
- add kerneldoc headers over nfsd's lm_open_conflict operations
- revise changelog on lease_free_list() patch
- whitespace fixes in locking.rst
- Link to v1: https://lore.kernel.org/r/20251201-dir-deleg-ro-v1-0-2e32cf2df9b7@xxxxxxxxxx

---
Jeff Layton (2):
filelock: add lease_dispose_list() helper
filelock: allow lease_managers to dictate what qualifies as a conflict

Documentation/filesystems/locking.rst | 1 +
fs/locks.c | 119 +++++++++++++++++-----------------
fs/nfsd/nfs4layouts.c | 23 ++++++-
fs/nfsd/nfs4state.c | 19 ++++++
include/linux/filelock.h | 1 +
5 files changed, 103 insertions(+), 60 deletions(-)
---
base-commit: 3f9f0252130e7dd60d41be0802bf58f6471c691d
change-id: 20251201-dir-deleg-ro-41a16bc22838

Best regards,
--
Jeff Layton <jlayton@xxxxxxxxxx>