From: Jeff Layton <jlayton@kernel.org>
To: Chuck Lever <chuck.lever@oracle.com>, Neil Brown <neilb@suse.de>,
Dai Ngo <Dai.Ngo@oracle.com>, Tom Talpey <tom@talpey.com>
Cc: Olga Kornievskaia <okorniev@redhat.com>,
linux-nfs@vger.kernel.org, linux-kernel@vger.kernel.org,
Jeff Layton <jlayton@kernel.org>
Subject: [PATCH v3 1/2] nfsd: make nfsd4_session->se_flags a bool
Date: Wed, 30 Oct 2024 10:48:46 -0400 [thread overview]
Message-ID: <20241030-bcwide-v3-1-c2df49a26c45@kernel.org> (raw)
In-Reply-To: <20241030-bcwide-v3-0-c2df49a26c45@kernel.org>
While this holds the flags from the CREATE_SESSION request, nothing
ever consults them. The only flag used is NFS4_SESSION_DEAD. Make it a
simple bool instead.
Signed-off-by: Jeff Layton <jlayton@kernel.org>
---
fs/nfsd/nfs4state.c | 6 +++---
fs/nfsd/state.h | 4 +---
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/fs/nfsd/nfs4state.c b/fs/nfsd/nfs4state.c
index 5b718b349396f1aecd0ad4c63b2f43342841bbd4..baf7994131fe1b0a4715174ba943fd2a9882aa12 100644
--- a/fs/nfsd/nfs4state.c
+++ b/fs/nfsd/nfs4state.c
@@ -149,14 +149,14 @@ void nfsd4_destroy_laundry_wq(void)
static bool is_session_dead(struct nfsd4_session *ses)
{
- return ses->se_flags & NFS4_SESSION_DEAD;
+ return ses->se_dead;
}
static __be32 mark_session_dead_locked(struct nfsd4_session *ses, int ref_held_by_me)
{
if (atomic_read(&ses->se_ref) > ref_held_by_me)
return nfserr_jukebox;
- ses->se_flags |= NFS4_SESSION_DEAD;
+ ses->se_dead = true;
return nfs_ok;
}
@@ -2133,7 +2133,7 @@ static void init_session(struct svc_rqst *rqstp, struct nfsd4_session *new, stru
INIT_LIST_HEAD(&new->se_conns);
new->se_cb_seq_nr = 1;
- new->se_flags = cses->flags;
+ new->se_dead = false;
new->se_cb_prog = cses->callback_prog;
new->se_cb_sec = cses->cb_sec;
atomic_set(&new->se_ref, 0);
diff --git a/fs/nfsd/state.h b/fs/nfsd/state.h
index 41cda86fea1f6166a0fd0215d3d458c93ced3e6a..d22e4f2c9039324a0953a9e15a3c255fb8ee1a44 100644
--- a/fs/nfsd/state.h
+++ b/fs/nfsd/state.h
@@ -314,11 +314,9 @@ struct nfsd4_conn {
*/
struct nfsd4_session {
atomic_t se_ref;
+ bool se_dead;
struct list_head se_hash; /* hash by sessionid */
struct list_head se_perclnt;
-/* See SESSION4_PERSIST, etc. for standard flags; this is internal-only: */
-#define NFS4_SESSION_DEAD 0x010
- u32 se_flags;
struct nfs4_client *se_client;
struct nfs4_sessionid se_sessionid;
struct nfsd4_channel_attrs se_fchannel;
--
2.47.0
next prev parent reply other threads:[~2024-10-30 14:48 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-10-30 14:48 [PATCH v3 0/2] nfsd: allow the use of multiple backchannel slots Jeff Layton
2024-10-30 14:48 ` Jeff Layton [this message]
2024-10-30 14:48 ` [PATCH v3 2/2] nfsd: allow for up to 32 callback session slots Jeff Layton
2024-10-30 20:30 ` [PATCH v3 0/2] nfsd: allow the use of multiple backchannel slots cel
2024-11-05 22:08 ` Olga Kornievskaia
2024-11-05 22:27 ` Jeff Layton
2024-11-05 22:40 ` Olga Kornievskaia
2024-11-05 22:55 ` Jeff Layton
2024-11-06 15:16 ` Sebastian Feld
2024-11-06 15:37 ` Chuck Lever III
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=20241030-bcwide-v3-1-c2df49a26c45@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