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.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/fs/nfs/nfs4renewd.c b/fs/nfs/nfs4renewd.c
index a3001628ad32..f62c2f7a4ffb 100644
--- a/fs/nfs/nfs4renewd.c
+++ b/fs/nfs/nfs4renewd.c
@@ -54,6 +54,7 @@
54#include <linux/nfs4.h> 54#include <linux/nfs4.h>
55#include <linux/nfs_fs.h> 55#include <linux/nfs_fs.h>
56#include "nfs4_fs.h" 56#include "nfs4_fs.h"
57#include "delegation.h"
57 58
58#define NFSDBG_FACILITY NFSDBG_PROC 59#define NFSDBG_FACILITY NFSDBG_PROC
59 60
@@ -68,7 +69,7 @@ nfs4_renew_state(void *data)
68 dprintk("%s: start\n", __FUNCTION__); 69 dprintk("%s: start\n", __FUNCTION__);
69 /* Are there any active superblocks? */ 70 /* Are there any active superblocks? */
70 if (list_empty(&clp->cl_superblocks)) 71 if (list_empty(&clp->cl_superblocks))
71 goto out; 72 goto out;
72 spin_lock(&clp->cl_lock); 73 spin_lock(&clp->cl_lock);
73 lease = clp->cl_lease_time; 74 lease = clp->cl_lease_time;
74 last = clp->cl_last_renewal; 75 last = clp->cl_last_renewal;
@@ -76,6 +77,12 @@ nfs4_renew_state(void *data)
76 timeout = (2 * lease) / 3 + (long)last - (long)now; 77 timeout = (2 * lease) / 3 + (long)last - (long)now;
77 /* Are we close to a lease timeout? */ 78 /* Are we close to a lease timeout? */
78 if (time_after(now, last + lease/3)) { 79 if (time_after(now, last + lease/3)) {
80 if (list_empty(&clp->cl_state_owners)) {
81 set_bit(NFS4CLNT_LEASE_EXPIRED, &clp->cl_state);
82 spin_unlock(&clp->cl_lock);
83 nfs_expire_all_delegations(clp);
84 goto out;
85 }
79 spin_unlock(&clp->cl_lock); 86 spin_unlock(&clp->cl_lock);
80 /* Queue an asynchronous RENEW. */ 87 /* Queue an asynchronous RENEW. */
81 nfs4_proc_async_renew(clp); 88 nfs4_proc_async_renew(clp);