aboutsummaryrefslogtreecommitdiffstats
path: root/fs/nfsd/nfs4state.c
diff options
context:
space:
mode:
authorBenny Halevy <bhalevy@panasas.com>2010-05-12 00:13:41 +0300
committerJ. Bruce Fields <bfields@citi.umich.edu>2010-05-13 11:47:22 -0400
commit07cd4909a6c0c275ef42fd27748226975919e336 (patch)
tree90ffb93321817320cdf3cf8dbd643272b5752f7a /fs/nfsd/nfs4state.c
parent46583e2597af649f134462d2f2c1be5e6689198d (diff)
downloadkernel_samsung_smdk4412-07cd4909a6c0c275ef42fd27748226975919e336.zip
kernel_samsung_smdk4412-07cd4909a6c0c275ef42fd27748226975919e336.tar.gz
kernel_samsung_smdk4412-07cd4909a6c0c275ef42fd27748226975919e336.tar.bz2
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/nfs4state.c')
-rw-r--r--fs/nfsd/nfs4state.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/fs/nfsd/nfs4state.c b/fs/nfsd/nfs4state.c
index e439a88..98aa7e8 100644
--- a/fs/nfsd/nfs4state.c
+++ b/fs/nfsd/nfs4state.c
@@ -632,6 +632,14 @@ free_session(struct kref *kref)
static inline void
renew_client_locked(struct nfs4_client *clp)
{
+ if (is_client_expired(clp)) {
+ dprintk("%s: client (clientid %08x/%08x) already expired\n",
+ __func__,
+ clp->cl_clientid.cl_boot,
+ clp->cl_clientid.cl_id);
+ return;
+ }
+
/*
* Move client to the end to the LRU list.
*/
@@ -697,6 +705,7 @@ free_client(struct nfs4_client *clp)
static inline void
unhash_client_locked(struct nfs4_client *clp)
{
+ mark_client_expired(clp);
list_del(&clp->cl_lru);
while (!list_empty(&clp->cl_sessions)) {
struct nfsd4_session *ses;
@@ -836,6 +845,7 @@ static struct nfs4_client *create_client(struct xdr_netobj name, char *recdir,
INIT_LIST_HEAD(&clp->cl_delegations);
INIT_LIST_HEAD(&clp->cl_sessions);
INIT_LIST_HEAD(&clp->cl_lru);
+ clp->cl_time = get_seconds();
clear_bit(0, &clp->cl_cb_slot_busy);
rpc_init_wait_queue(&clp->cl_cb_waitq, "Backchannel slot table");
copy_verf(clp, verf);