|
@@ -77,16 +77,18 @@ nfs4_renew_state(struct work_struct *work)
|
|
/* Are we close to a lease timeout? */
|
|
/* Are we close to a lease timeout? */
|
|
if (time_after(now, last + lease/3)) {
|
|
if (time_after(now, last + lease/3)) {
|
|
cred = nfs4_get_renew_cred_locked(clp);
|
|
cred = nfs4_get_renew_cred_locked(clp);
|
|
|
|
+ spin_unlock(&clp->cl_lock);
|
|
if (cred == NULL) {
|
|
if (cred == NULL) {
|
|
- set_bit(NFS4CLNT_LEASE_EXPIRED, &clp->cl_state);
|
|
|
|
- spin_unlock(&clp->cl_lock);
|
|
|
|
|
|
+ if (list_empty(&clp->cl_delegations)) {
|
|
|
|
+ set_bit(NFS4CLNT_LEASE_EXPIRED, &clp->cl_state);
|
|
|
|
+ goto out;
|
|
|
|
+ }
|
|
nfs_expire_all_delegations(clp);
|
|
nfs_expire_all_delegations(clp);
|
|
- goto out;
|
|
|
|
|
|
+ } else {
|
|
|
|
+ /* Queue an asynchronous RENEW. */
|
|
|
|
+ nfs4_proc_async_renew(clp, cred);
|
|
|
|
+ put_rpccred(cred);
|
|
}
|
|
}
|
|
- spin_unlock(&clp->cl_lock);
|
|
|
|
- /* Queue an asynchronous RENEW. */
|
|
|
|
- nfs4_proc_async_renew(clp, cred);
|
|
|
|
- put_rpccred(cred);
|
|
|
|
timeout = (2 * lease) / 3;
|
|
timeout = (2 * lease) / 3;
|
|
spin_lock(&clp->cl_lock);
|
|
spin_lock(&clp->cl_lock);
|
|
} else
|
|
} else
|