aboutsummaryrefslogtreecommitdiffstats
path: root/fs/nfs/nfs4state.c
diff options
context:
space:
mode:
authorTrond Myklebust <Trond.Myklebust@netapp.com>2008-12-23 15:21:42 -0500
committerTrond Myklebust <Trond.Myklebust@netapp.com>2008-12-23 15:21:42 -0500
commit0f605b56008c4b6b075217480c36ba395ca4eaa4 (patch)
tree1f7c5cb0b0446dba2c78b3430f6c85e1c01b5383 /fs/nfs/nfs4state.c
parente598d843c08a7ab6bdfa8098de49afb017fc6c6a (diff)
NFSv4: Don't tell server we rebooted when not necessary
Instead of doing a full setclientid, try doing a RENEW call first. Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'fs/nfs/nfs4state.c')
-rw-r--r--fs/nfs/nfs4state.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/fs/nfs/nfs4state.c b/fs/nfs/nfs4state.c
index 3cc88a5d9881..a780518c5c3f 100644
--- a/fs/nfs/nfs4state.c
+++ b/fs/nfs/nfs4state.c
@@ -1059,19 +1059,19 @@ static int nfs4_check_lease(struct nfs_client *clp)
1059 struct rpc_cred *cred; 1059 struct rpc_cred *cred;
1060 int status = -NFS4ERR_EXPIRED; 1060 int status = -NFS4ERR_EXPIRED;
1061 1061
1062 /* Are there any open files on this volume? */ 1062 /* Is the client already known to have an expired lease? */
1063 if (test_bit(NFS4CLNT_LEASE_EXPIRED, &clp->cl_state))
1064 return 0;
1063 cred = nfs4_get_renew_cred(clp); 1065 cred = nfs4_get_renew_cred(clp);
1064 if (cred != NULL) { 1066 if (cred == NULL) {
1065 /* Yes there are: try to renew the old lease */ 1067 cred = nfs4_get_setclientid_cred(clp);
1066 status = nfs4_proc_renew(clp, cred); 1068 if (cred == NULL)
1067 put_rpccred(cred); 1069 goto out;
1068 nfs4_recovery_handle_error(clp, status);
1069 return status;
1070 } 1070 }
1071 1071 status = nfs4_proc_renew(clp, cred);
1072 /* "reboot" to ensure we clear all state on the server */ 1072 put_rpccred(cred);
1073 clp->cl_boot_time = CURRENT_TIME; 1073out:
1074 set_bit(NFS4CLNT_LEASE_EXPIRED, &clp->cl_state); 1074 nfs4_recovery_handle_error(clp, status);
1075 return status; 1075 return status;
1076} 1076}
1077 1077