linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/3] filelock: remove redundant filp arguments from API
@ 2022-11-14 15:02 Jeff Layton
  2022-11-14 15:02 ` [PATCH 1/3] filelock: remove redundant filp argument from vfs_lock_file Jeff Layton
                   ` (3 more replies)
  0 siblings, 4 replies; 9+ messages in thread
From: Jeff Layton @ 2022-11-14 15:02 UTC (permalink / raw)
  To: chuck.lever, linux-fsdevel; +Cc: trond.myklebust, linux-nfs

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/20221111215538.356543-1-jlayton@kernel.org/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(-)

-- 
2.38.1


^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2022-11-15  9:00 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-11-14 15:02 [PATCH 0/3] filelock: remove redundant filp arguments from API Jeff Layton
2022-11-14 15:02 ` [PATCH 1/3] filelock: remove redundant filp argument from vfs_lock_file Jeff Layton
2022-11-15  8:59   ` Christoph Hellwig
2022-11-14 15:02 ` [PATCH 2/3] filelock: remove redundant filp argument from vfs_test_lock Jeff Layton
2022-11-15  8:59   ` Christoph Hellwig
2022-11-14 15:02 ` [PATCH 3/3] filelock: remove redundant filp arg from vfs_cancel_lock Jeff Layton
2022-11-15  9:00   ` Christoph Hellwig
2022-11-14 15:08 ` [PATCH 0/3] filelock: remove redundant filp arguments from API Chuck Lever III
2022-11-14 15:31   ` Jeff Layton

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).