Skip to content

Commit 10c93b5

Browse files
jtlaytonchucklever
authored andcommitted
nfsd: make nfsd4_session->se_flags a bool
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> Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
1 parent 53f9ba7 commit 10c93b5

File tree

2 files changed

+4
-6
lines changed

2 files changed

+4
-6
lines changed

fs/nfsd/nfs4state.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -149,14 +149,14 @@ void nfsd4_destroy_laundry_wq(void)
149149

150150
static bool is_session_dead(struct nfsd4_session *ses)
151151
{
152-
return ses->se_flags & NFS4_SESSION_DEAD;
152+
return ses->se_dead;
153153
}
154154

155155
static __be32 mark_session_dead_locked(struct nfsd4_session *ses, int ref_held_by_me)
156156
{
157157
if (atomic_read(&ses->se_ref) > ref_held_by_me)
158158
return nfserr_jukebox;
159-
ses->se_flags |= NFS4_SESSION_DEAD;
159+
ses->se_dead = true;
160160
return nfs_ok;
161161
}
162162

@@ -2133,7 +2133,7 @@ static void init_session(struct svc_rqst *rqstp, struct nfsd4_session *new, stru
21332133
INIT_LIST_HEAD(&new->se_conns);
21342134

21352135
new->se_cb_seq_nr = 1;
2136-
new->se_flags = cses->flags;
2136+
new->se_dead = false;
21372137
new->se_cb_prog = cses->callback_prog;
21382138
new->se_cb_sec = cses->cb_sec;
21392139
atomic_set(&new->se_ref, 0);

fs/nfsd/state.h

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -296,11 +296,9 @@ struct nfsd4_conn {
296296
*/
297297
struct nfsd4_session {
298298
atomic_t se_ref;
299+
bool se_dead;
299300
struct list_head se_hash; /* hash by sessionid */
300301
struct list_head se_perclnt;
301-
/* See SESSION4_PERSIST, etc. for standard flags; this is internal-only: */
302-
#define NFS4_SESSION_DEAD 0x010
303-
u32 se_flags;
304302
struct nfs4_client *se_client;
305303
struct nfs4_sessionid se_sessionid;
306304
struct nfsd4_channel_attrs se_fchannel;

0 commit comments

Comments
 (0)