Linux NFS development
 help / color / mirror / Atom feed
From: Jeff Layton <jlayton@kernel.org>
To: Chuck Lever <chuck.lever@oracle.com>, Neil Brown <neilb@suse.de>,
	Olga Kornievskaia <okorniev@redhat.com>,
	Dai Ngo <Dai.Ngo@oracle.com>, Tom Talpey <tom@talpey.com>
Cc: linux-nfs@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 4/5] nfsd: clean up if statement in nfsd4_close_open_stateid()
Date: Tue, 04 Mar 2025 10:24:08 -0500	[thread overview]
Message-ID: <ebbd3d0faa939d498eb3bc67c7ba9c2ae72f3e60.camel@kernel.org> (raw)
In-Reply-To: <20250303-nfsd-cleanup-v1-4-14068e8f59c5@kernel.org>

On Mon, 2025-03-03 at 12:26 -0500, Jeff Layton wrote:
> Just set unhashed to false in the one case where we return that
> explicitly, and drop the else.
> 
> Signed-off-by: Jeff Layton <jlayton@kernel.org>
> ---
>  fs/nfsd/nfs4state.c | 9 ++++-----
>  1 file changed, 4 insertions(+), 5 deletions(-)
> 
> diff --git a/fs/nfsd/nfs4state.c b/fs/nfsd/nfs4state.c
> index a7bac93445e2fdbe743b77e66238d652094907cb..1f3e9d42fcd784ea8d101ad3549702a30dfe9058 100644
> --- a/fs/nfsd/nfs4state.c
> +++ b/fs/nfsd/nfs4state.c
> @@ -7644,12 +7644,11 @@ static bool nfsd4_close_open_stateid(struct nfs4_ol_stateid *s)
>  		list_for_each_entry(stp, &reaplist, st_locks)
>  			nfs4_free_cpntf_statelist(clp->net, &stp->st_stid);
>  		free_ol_stateid_reaplist(&reaplist);
> -		return false;
> -	} else {
> -		spin_unlock(&clp->cl_lock);
> -		free_ol_stateid_reaplist(&reaplist);
> -		return unhashed;
> +		unhashed = false;
>  	}
> +	spin_unlock(&clp->cl_lock);
> +	free_ol_stateid_reaplist(&reaplist);
> +	return unhashed;
>  }
>  
>  /*
> 

My apologies, Chuck. This patch has a bug in it. Can you drop it from
nfsd-testing? I may or may not send a replacement.

Thanks,
-- 
Jeff Layton <jlayton@kernel.org>

  reply	other threads:[~2025-03-04 15:24 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-03-03 17:25 [PATCH 0/5] nfsd: some small cleanup patches Jeff Layton
2025-03-03 17:25 ` [PATCH 1/5] nfsd: reorganize struct nfs4_delegation for better packing Jeff Layton
2025-03-03 17:26 ` [PATCH 2/5] nfsd: remove unneeded forward declaration of nfsd4_mark_cb_fault() Jeff Layton
2025-03-03 17:26 ` [PATCH 3/5] nfsd: remove obsolete comment from nfs4_alloc_stid Jeff Layton
2025-03-03 17:26 ` [PATCH 4/5] nfsd: clean up if statement in nfsd4_close_open_stateid() Jeff Layton
2025-03-04 15:24   ` Jeff Layton [this message]
2025-03-04 15:29     ` Chuck Lever
2025-03-03 17:26 ` [PATCH 5/5] nfsd: use a long for the count in nfsd4_state_shrinker_count() Jeff Layton
2025-03-03 21:41 ` [PATCH 0/5] nfsd: some small cleanup patches cel

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=ebbd3d0faa939d498eb3bc67c7ba9c2ae72f3e60.camel@kernel.org \
    --to=jlayton@kernel.org \
    --cc=Dai.Ngo@oracle.com \
    --cc=chuck.lever@oracle.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-nfs@vger.kernel.org \
    --cc=neilb@suse.de \
    --cc=okorniev@redhat.com \
    --cc=tom@talpey.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