Skip to content

filelock: remove redundant filp arguments from API

Jeff Layton linux-fsdevel linux-nfs 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest3 patches 5 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3filelock: remove redundant filp argument from vfs_lock_filefs/ksmbd/smb2pdu.c fs/lockd/svclock.c fs/lockd/svcsubs.c +3 more+20 -241 reply
2/3filelock: remove redundant filp argument from vfs_test_lockfs/lockd/svclock.c fs/locks.c fs/nfsd/nfs4state.c +1 more+9 -111 reply
3/3filelock: remove redundant filp arg from vfs_cancel_lockfs/lockd/svclock.c fs/locks.c include/linux/fs.h+6 -81 reply

Reviews trailers per patch

All 3 patches have a Reviewed-by or Acked-by.

PatchChristoph Hellwig
1/3R-b
2/3R-b
3/3R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH 0/3] filelock: remove redundant filp arguments from API

Some of the exported functions in fs/locks.c take both a struct file argument and a struct file_lock. struct file_lock has a dedicated field to record which file it was set on (fl_file). This is redundant, and there have been some cases where the two didn't match [1], leading to bugs.

This patchset is intended to remove this ambiguity by eliminating the separate struct file argument from vfs_lock_file, vfs_test_lock and vfs_cancel_lock.

Most callers are easy to vet to ensure that they set this correctly, but lockd had a few places where it wasn't doing the right thing. This series depends on the lockd patches I sent late last week [2].

I'm targeting this series for v6.3. I'll plan to get it into linux-next soon unless there are objections.

[1]: https://bugzilla.kernel.org/show_bug.cgi?id=216582
[2]: https://lore.kernel.org/linux-nfs/[email protected]/T/#t

Jeff Layton (3):
filelock: remove redundant filp argument from vfs_lock_file
filelock: remove redundant filp argument from vfs_test_lock
filelock: remove redundant filp arg from vfs_cancel_lock

 fs/ksmbd/smb2pdu.c  |  4 ++--
 fs/lockd/svclock.c  | 21 +++++++--------------
 fs/lockd/svcsubs.c  |  4 ++--
 fs/locks.c          | 29 ++++++++++++++---------------
 fs/nfsd/nfs4state.c |  6 +++---
 include/linux/fs.h  | 14 +++++++-------
 6 files changed, 35 insertions(+), 43 deletions(-)
Signature · 1 line
2.38.1