aboutsummaryrefslogtreecommitdiffstats
path: root/fs/nfs/nfs4renewd.c
diff options
context:
space:
mode:
authorTrond Myklebust <Trond.Myklebust@netapp.com>2008-12-23 15:21:50 -0500
committerTrond Myklebust <Trond.Myklebust@netapp.com>2008-12-23 15:21:50 -0500
commitb0d3ded1a21dc3057daff5a488469d9e6aa1b567 (patch)
tree1e30c75402d091e19219d73850879317bb345b87 /fs/nfs/nfs4renewd.c
parentNFSv4: Fix a BAD_SEQUENCEID condition. (diff)
downloadlinux-dev-b0d3ded1a21dc3057daff5a488469d9e6aa1b567.tar.xz
linux-dev-b0d3ded1a21dc3057daff5a488469d9e6aa1b567.zip
NFSv4: Clean up nfs_expire_all_delegations()
Let the actual delegreturn stuff be run in the state manager thread rather than allocating a separate kthread. Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
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)
/* Are we close to a lease timeout? */
if (time_after(now, last + lease/3)) {
cred = nfs4_get_renew_cred_locked(clp);
+ spin_unlock(&clp->cl_lock);
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);
- 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;
spin_lock(&clp->cl_lock);
} else