linux-nfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jeff Layton <jlayton@kernel.org>
To: Li kunyu <kunyu@nfschina.com>,
	chuck.lever@oracle.com, neilb@suse.de,  kolga@netapp.com,
	Dai.Ngo@oracle.com, tom@talpey.com,
	 trond.myklebust@hammerspace.com, anna@kernel.org
Cc: linux-nfs@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] lockd: host: Remove unnecessary statements'host = NULL;'
Date: Wed, 17 Apr 2024 06:06:17 -0400	[thread overview]
Message-ID: <15f042f51d23568715002d876b98ad0513db6737.camel@kernel.org> (raw)
In-Reply-To: <20240417082807.14178-1-kunyu@nfschina.com>

On Wed, 2024-04-17 at 16:28 +0800, Li kunyu wrote:
> In 'nlm_alloc_host', the host has already been assigned a value of NULL
> when defined, so 'host=NULL;' Can be deleted.
> 
> Signed-off-by: Li kunyu <kunyu@nfschina.com>
> ---
>  fs/lockd/host.c | 1 -
>  1 file changed, 1 deletion(-)
> 
> diff --git a/fs/lockd/host.c b/fs/lockd/host.c
> index 127a728fcbc81..c115168017845 100644
> --- a/fs/lockd/host.c
> +++ b/fs/lockd/host.c
> @@ -117,7 +117,6 @@ static struct nlm_host *nlm_alloc_host(struct nlm_lookup_host_info *ni,
>  	if (nsm != NULL)
>  		refcount_inc(&nsm->sm_count);
>  	else {
> -		host = NULL;
>  		nsm = nsm_get_handle(ni->net, ni->sap, ni->salen,
>  					ni->hostname, ni->hostname_len);
>  		if (unlikely(nsm == NULL)) {

Reviewed-by: Jeff Layton <jlayton@kernel.org>

  reply	other threads:[~2024-04-17 10:06 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-17  8:28 [PATCH] lockd: host: Remove unnecessary statements'host = NULL;' Li kunyu
2024-04-17 10:06 ` Jeff Layton [this message]
2024-04-17 16:28 ` 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=15f042f51d23568715002d876b98ad0513db6737.camel@kernel.org \
    --to=jlayton@kernel.org \
    --cc=Dai.Ngo@oracle.com \
    --cc=anna@kernel.org \
    --cc=chuck.lever@oracle.com \
    --cc=kolga@netapp.com \
    --cc=kunyu@nfschina.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-nfs@vger.kernel.org \
    --cc=neilb@suse.de \
    --cc=tom@talpey.com \
    --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).