aboutsummaryrefslogtreecommitdiffstats
path: root/fs/nfs
diff options
context:
space:
mode:
Diffstat (limited to 'fs/nfs')
-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