Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 124723
b: refs/heads/master
c: 0f605b5
h: refs/heads/master
i:
  124721: d28d669
  124719: 02b6bd1
v: v3
  • Loading branch information
Trond Myklebust authored and Trond Myklebust committed Dec 23, 2008
1 parent 32164db commit a05c480
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 12 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: e598d843c08a7ab6bdfa8098de49afb017fc6c6a
refs/heads/master: 0f605b56008c4b6b075217480c36ba395ca4eaa4
22 changes: 11 additions & 11 deletions trunk/fs/nfs/nfs4state.c
Original file line number Diff line number Diff line change
Expand Up @@ -1059,19 +1059,19 @@ static int nfs4_check_lease(struct nfs_client *clp)
struct rpc_cred *cred;
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);
if (cred != NULL) {
/* Yes there are: try to renew the old lease */
status = nfs4_proc_renew(clp, cred);
put_rpccred(cred);
nfs4_recovery_handle_error(clp, status);
return status;
if (cred == NULL) {
cred = nfs4_get_setclientid_cred(clp);
if (cred == NULL)
goto out;
}

/* "reboot" to ensure we clear all state on the server */
clp->cl_boot_time = CURRENT_TIME;
set_bit(NFS4CLNT_LEASE_EXPIRED, &clp->cl_state);
status = nfs4_proc_renew(clp, cred);
put_rpccred(cred);
out:
nfs4_recovery_handle_error(clp, status);
return status;
}

Expand Down

0 comments on commit a05c480

Please sign in to comment.