[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <fe81a448795cb8087274cef8c22e1c5eee3d2a70.camel@kernel.org>
Date: Fri, 23 Aug 2024 08:09:24 -0400
From: Jeff Layton <jlayton@...nel.org>
To: Li Lingfeng <lilingfeng3@...wei.com>, trondmy@...nel.org,
anna@...nel.org, chuck.lever@...cle.com, neilb@...e.de, kolga@...app.com,
Dai.Ngo@...cle.com, tom@...pey.com
Cc: linux-nfs@...r.kernel.org, linux-kernel@...r.kernel.org,
yukuai1@...weicloud.com, houtao1@...wei.com, yi.zhang@...wei.com,
yangerkun@...wei.com, lilingfeng@...weicloud.com
Subject: Re: [PATCH 4/4] nfsd: remove unused parameter of
nfsd_file_mark_find_or_create
On Fri, 2024-08-23 at 15:00 +0800, Li Lingfeng wrote:
> Commit 427f5f83a319 ("NFSD: Ensure nf_inode is never dereferenced") passes
> inode directly to nfsd_file_mark_find_or_create instead of getting it from
> nf, so there is no need to pass nf.
>
> Signed-off-by: Li Lingfeng <lilingfeng3@...wei.com>
> ---
> fs/nfsd/filecache.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/fs/nfsd/filecache.c b/fs/nfsd/filecache.c
> index f4704f5d4086..376ec62e7794 100644
> --- a/fs/nfsd/filecache.c
> +++ b/fs/nfsd/filecache.c
> @@ -151,7 +151,7 @@ nfsd_file_mark_put(struct nfsd_file_mark *nfm)
> }
>
> static struct nfsd_file_mark *
> -nfsd_file_mark_find_or_create(struct nfsd_file *nf, struct inode *inode)
> +nfsd_file_mark_find_or_create(struct inode *inode)
> {
> int err;
> struct fsnotify_mark *mark;
> @@ -1074,7 +1074,7 @@ nfsd_file_do_acquire(struct svc_rqst *rqstp, struct svc_fh *fhp,
>
> open_file:
> trace_nfsd_file_alloc(nf);
> - nf->nf_mark = nfsd_file_mark_find_or_create(nf, inode);
> + nf->nf_mark = nfsd_file_mark_find_or_create(inode);
> if (nf->nf_mark) {
> if (file) {
> get_file(file);
Nice cleanup.
Reviewed-by: Jeff Layton <jlayton@...nel.org>
Powered by blists - more mailing lists