linux-nfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jeff Layton <jlayton@kernel.org>
To: Li Lingfeng <lilingfeng3@huawei.com>,
	trondmy@kernel.org, anna@kernel.org,  chuck.lever@oracle.com,
	neilb@suse.de, kolga@netapp.com, Dai.Ngo@oracle.com,
	 tom@talpey.com
Cc: linux-nfs@vger.kernel.org, linux-kernel@vger.kernel.org,
	 yukuai1@huaweicloud.com, houtao1@huawei.com,
	yi.zhang@huawei.com,  yangerkun@huawei.com,
	lilingfeng@huaweicloud.com
Subject: Re: [PATCH 4/4] nfsd: remove unused parameter of nfsd_file_mark_find_or_create
Date: Fri, 23 Aug 2024 08:09:24 -0400	[thread overview]
Message-ID: <fe81a448795cb8087274cef8c22e1c5eee3d2a70.camel@kernel.org> (raw)
In-Reply-To: <20240823070049.3499625-5-lilingfeng3@huawei.com>

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@huawei.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@kernel.org>

  reply	other threads:[~2024-08-23 12:09 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-08-23  7:00 [PATCH 0/4] nfsd: fix some comments and code cleanup Li Lingfeng
2024-08-23  7:00 ` [PATCH 1/4] nfsd: fix the comment of nfs_get_root Li Lingfeng
2024-08-23 12:06   ` Jeff Layton
2024-08-23  7:00 ` [PATCH 2/4] nfsd: fix some spelling errors in comments Li Lingfeng
2024-08-23 12:07   ` Jeff Layton
2024-08-24  0:54     ` Li Lingfeng
2024-08-23  7:00 ` [PATCH 3/4] nfsd: remove the redundant blank line Li Lingfeng
2024-08-23 12:08   ` Jeff Layton
2024-08-24  0:44     ` Li Lingfeng
2024-08-23  7:00 ` [PATCH 4/4] nfsd: remove unused parameter of nfsd_file_mark_find_or_create Li Lingfeng
2024-08-23 12:09   ` Jeff Layton [this message]
2024-08-23 16:39   ` Chuck Lever

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=fe81a448795cb8087274cef8c22e1c5eee3d2a70.camel@kernel.org \
    --to=jlayton@kernel.org \
    --cc=Dai.Ngo@oracle.com \
    --cc=anna@kernel.org \
    --cc=chuck.lever@oracle.com \
    --cc=houtao1@huawei.com \
    --cc=kolga@netapp.com \
    --cc=lilingfeng3@huawei.com \
    --cc=lilingfeng@huaweicloud.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-nfs@vger.kernel.org \
    --cc=neilb@suse.de \
    --cc=tom@talpey.com \
    --cc=trondmy@kernel.org \
    --cc=yangerkun@huawei.com \
    --cc=yi.zhang@huawei.com \
    --cc=yukuai1@huaweicloud.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).