linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jeff Layton <jlayton@kernel.org>
To: Chuck Lever III <chuck.lever@oracle.com>
Cc: linux-fsdevel <linux-fsdevel@vger.kernel.org>,
	Trond Myklebust <trond.myklebust@hammerspace.com>,
	Linux NFS Mailing List <linux-nfs@vger.kernel.org>
Subject: Re: [PATCH 0/3] filelock: remove redundant filp arguments from API
Date: Mon, 14 Nov 2022 10:31:37 -0500	[thread overview]
Message-ID: <a2a3a6a3eaa433f7d38086e6d0623e0ef91f0c9f.camel@kernel.org> (raw)
In-Reply-To: <3C490193-AFF8-479E-ACEF-ADD02E3E15D5@oracle.com>

On Mon, 2022-11-14 at 15:08 +0000, Chuck Lever III wrote:
> 
> > On Nov 14, 2022, at 10:02 AM, Jeff Layton <jlayton@kernel.org> wrote:
> > 
> > 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.
> 
> Hi Jeff, doesn't the same argument apply to f_ops->lock ? Do you
> have a plan for updating that API as well?
> 
> 

It does apply to fops->lock. I don't have a real plan as of yet. I
figure we'll get this set in first and then we can look at changing that
API as well.

> > 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
> > 
> 
> --
> Chuck Lever
> 
> 
> 

-- 
Jeff Layton <jlayton@kernel.org>

      reply	other threads:[~2022-11-14 15:32 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 message]

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=a2a3a6a3eaa433f7d38086e6d0623e0ef91f0c9f.camel@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 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).