aboutsummaryrefslogtreecommitdiffstats
path: root/fs/nfsd/state.h
diff options
context:
space:
mode:
authorBenny Halevy <bhalevy@panasas.com>2010-05-11 17:13:41 -0400
committerJ. Bruce Fields <bfields@citi.umich.edu>2010-05-13 11:47:22 -0400
commit07cd4909a6c0c275ef42fd27748226975919e336 (patch)
tree90ffb93321817320cdf3cf8dbd643272b5752f7a /fs/nfsd/state.h
parent46583e2597af649f134462d2f2c1be5e6689198d (diff)
nfsd4: mark_client_expired
Mark the client as expired under the client_lock so it won't be renewed when an nfsv4.1 session is done, after it was explicitly expired during processing of the compound. Do not renew a client mark as expired (in particular, it is not on the lru list anymore) Signed-off-by: Benny Halevy <bhalevy@panasas.com> Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
Diffstat (limited to 'fs/nfsd/state.h')
-rw-r--r--fs/nfsd/state.h14
1 files changed, 13 insertions, 1 deletions
diff --git a/fs/nfsd/state.h b/fs/nfsd/state.h
index ee42a0beecfa..cfd743ea4b79 100644
--- a/fs/nfsd/state.h
+++ b/fs/nfsd/state.h
@@ -166,7 +166,7 @@ struct nfsd4_session {
166 struct list_head se_hash; /* hash by sessionid */ 166 struct list_head se_hash; /* hash by sessionid */
167 struct list_head se_perclnt; 167 struct list_head se_perclnt;
168 u32 se_flags; 168 u32 se_flags;
169 struct nfs4_client *se_client; /* for expire_client */ 169 struct nfs4_client *se_client;
170 struct nfs4_sessionid se_sessionid; 170 struct nfs4_sessionid se_sessionid;
171 struct nfsd4_channel_attrs se_fchannel; 171 struct nfsd4_channel_attrs se_fchannel;
172 struct nfsd4_channel_attrs se_bchannel; 172 struct nfsd4_channel_attrs se_bchannel;
@@ -244,6 +244,18 @@ struct nfs4_client {
244 /* wait here for slots */ 244 /* wait here for slots */
245}; 245};
246 246
247static inline void
248mark_client_expired(struct nfs4_client *clp)
249{
250 clp->cl_time = 0;
251}
252
253static inline bool
254is_client_expired(struct nfs4_client *clp)
255{
256 return clp->cl_time == 0;
257}
258
247/* struct nfs4_client_reset 259/* struct nfs4_client_reset
248 * one per old client. Populates reset_str_hashtbl. Filled from conf_id_hashtbl 260 * one per old client. Populates reset_str_hashtbl. Filled from conf_id_hashtbl
249 * upon lease reset, or from upcall to state_daemon (to read in state 261 * upon lease reset, or from upcall to state_daemon (to read in state