mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-09-04 20:19:47 +08:00
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>
This commit is contained in:
parent
53f9ba78e0
commit
10c93b5101
@ -149,14 +149,14 @@ void nfsd4_destroy_laundry_wq(void)
|
|||||||
|
|
||||||
static bool is_session_dead(struct nfsd4_session *ses)
|
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)
|
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)
|
if (atomic_read(&ses->se_ref) > ref_held_by_me)
|
||||||
return nfserr_jukebox;
|
return nfserr_jukebox;
|
||||||
ses->se_flags |= NFS4_SESSION_DEAD;
|
ses->se_dead = true;
|
||||||
return nfs_ok;
|
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);
|
INIT_LIST_HEAD(&new->se_conns);
|
||||||
|
|
||||||
new->se_cb_seq_nr = 1;
|
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_prog = cses->callback_prog;
|
||||||
new->se_cb_sec = cses->cb_sec;
|
new->se_cb_sec = cses->cb_sec;
|
||||||
atomic_set(&new->se_ref, 0);
|
atomic_set(&new->se_ref, 0);
|
||||||
|
@ -296,11 +296,9 @@ struct nfsd4_conn {
|
|||||||
*/
|
*/
|
||||||
struct nfsd4_session {
|
struct nfsd4_session {
|
||||||
atomic_t se_ref;
|
atomic_t se_ref;
|
||||||
|
bool se_dead;
|
||||||
struct list_head se_hash; /* hash by sessionid */
|
struct list_head se_hash; /* hash by sessionid */
|
||||||
struct list_head se_perclnt;
|
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_client *se_client;
|
||||||
struct nfs4_sessionid se_sessionid;
|
struct nfs4_sessionid se_sessionid;
|
||||||
struct nfsd4_channel_attrs se_fchannel;
|
struct nfsd4_channel_attrs se_fchannel;
|
||||||
|
Loading…
Reference in New Issue
Block a user