From: Jeff Layton <jlayton@kernel.org>
To: chuck.lever@oracle.com, linux-fsdevel@vger.kernel.org
Cc: trond.myklebust@hammerspace.com, linux-nfs@vger.kernel.org
Subject: [PATCH 0/3] filelock: remove redundant filp arguments from API
Date: Mon, 14 Nov 2022 10:02:37 -0500 [thread overview]
Message-ID: <20221114150240.198648-1-jlayton@kernel.org> (raw)
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
next reply other threads:[~2022-11-14 15:02 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-11-14 15:02 Jeff Layton [this message]
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20221114150240.198648-1-jlayton@kernel.org \
--to=jlayton@kernel.org \
--cc=chuck.lever@oracle.com \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-nfs@vger.kernel.org \
--cc=trond.myklebust@hammerspace.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.