Commit 0f605b56 authored by Trond Myklebust's avatar Trond Myklebust

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: default avatarTrond Myklebust <Trond.Myklebust@netapp.com>
parent e598d843
...@@ -1059,19 +1059,19 @@ static int nfs4_check_lease(struct nfs_client *clp) ...@@ -1059,19 +1059,19 @@ static int nfs4_check_lease(struct nfs_client *clp)
struct rpc_cred *cred; struct rpc_cred *cred;
int status = -NFS4ERR_EXPIRED; int status = -NFS4ERR_EXPIRED;
/* Are there any open files on this volume? */ /* Is the client already known to have an expired lease? */
if (test_bit(NFS4CLNT_LEASE_EXPIRED, &clp->cl_state))
return 0;
cred = nfs4_get_renew_cred(clp); cred = nfs4_get_renew_cred(clp);
if (cred != NULL) { if (cred == NULL) {
/* Yes there are: try to renew the old lease */ cred = nfs4_get_setclientid_cred(clp);
status = nfs4_proc_renew(clp, cred); if (cred == NULL)
put_rpccred(cred); goto out;
nfs4_recovery_handle_error(clp, status);
return status;
} }
status = nfs4_proc_renew(clp, cred);
/* "reboot" to ensure we clear all state on the server */ put_rpccred(cred);
clp->cl_boot_time = CURRENT_TIME; out:
set_bit(NFS4CLNT_LEASE_EXPIRED, &clp->cl_state); nfs4_recovery_handle_error(clp, status);
return status; return status;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment