aboutsummaryrefslogtreecommitdiffstats
path: root/fs/nfs/nfs4renewd.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/nfs/nfs4renewd.c')
-rw-r--r--fs/nfs/nfs4renewd.c16
1 files changed, 9 insertions, 7 deletions
diff --git a/fs/nfs/nfs4renewd.c b/fs/nfs/nfs4renewd.c
index 6101f955f231..ca557e677d9e 100644
--- a/fs/nfs/nfs4renewd.c
+++ b/fs/nfs/nfs4renewd.c
@@ -77,16 +77,18 @@ nfs4_renew_state(struct work_struct *work)
77 /* Are we close to a lease timeout? */ 77 /* Are we close to a lease timeout? */
78 if (time_after(now, last + lease/3)) { 78 if (time_after(now, last + lease/3)) {
79 cred = nfs4_get_renew_cred_locked(clp); 79 cred = nfs4_get_renew_cred_locked(clp);
80 spin_unlock(&clp->cl_lock);
80 if (cred == NULL) { 81 if (cred == NULL) {
81 set_bit(NFS4CLNT_LEASE_EXPIRED, &clp->cl_state); 82 if (list_empty(&clp->cl_delegations)) {
82 spin_unlock(&clp->cl_lock); 83 set_bit(NFS4CLNT_LEASE_EXPIRED, &clp->cl_state);
84 goto out;
85 }
83 nfs_expire_all_delegations(clp); 86 nfs_expire_all_delegations(clp);
84 goto out; 87 } else {
88 /* Queue an asynchronous RENEW. */
89 nfs4_proc_async_renew(clp, cred);
90 put_rpccred(cred);
85 } 91 }
86 spin_unlock(&clp->cl_lock);
87 /* Queue an asynchronous RENEW. */
88 nfs4_proc_async_renew(clp, cred);
89 put_rpccred(cred);
90 timeout = (2 * lease) / 3; 92 timeout = (2 * lease) / 3;
91 spin_lock(&clp->cl_lock); 93 spin_lock(&clp->cl_lock);
92 } else 94 } else