summaryrefslogtreecommitdiff
path: root/fs/nfs/nfs4renewd.c
diff options
context:
space:
mode:
authorIngo Molnar <mingo@elte.hu>2011-10-04 11:08:16 +0200
committerIngo Molnar <mingo@elte.hu>2011-10-04 11:09:08 +0200
commit22f92bacbeea24b20e447444c28e7cad9f1ac3f8 (patch)
tree5c3f2346804a186aa2d954f078fd2f4d44bcc26e /fs/nfs/nfs4renewd.c
parent557ab425429a5123d37f412ce3e6d6137cb621f8 (diff)
parent0f86267b79bc6e357b8606077c7f70239045ea9c (diff)
Merge branch 'linus' into sched/core
Merge reason: pick up the latest fixes. Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'fs/nfs/nfs4renewd.c')
-rw-r--r--fs/nfs/nfs4renewd.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/fs/nfs/nfs4renewd.c b/fs/nfs/nfs4renewd.c
index df8e7f3ca56d..dc484c0eae7f 100644
--- a/fs/nfs/nfs4renewd.c
+++ b/fs/nfs/nfs4renewd.c
@@ -60,6 +60,7 @@ nfs4_renew_state(struct work_struct *work)
struct rpc_cred *cred;
long lease;
unsigned long last, now;
+ unsigned renew_flags = 0;
ops = clp->cl_mvops->state_renewal_ops;
dprintk("%s: start\n", __func__);
@@ -72,18 +73,23 @@ nfs4_renew_state(struct work_struct *work)
last = clp->cl_last_renewal;
now = jiffies;
/* Are we close to a lease timeout? */
- if (time_after(now, last + lease/3)) {
+ if (time_after(now, last + lease/3))
+ renew_flags |= NFS4_RENEW_TIMEOUT;
+ if (nfs_delegations_present(clp))
+ renew_flags |= NFS4_RENEW_DELEGATION_CB;
+
+ if (renew_flags != 0) {
cred = ops->get_state_renewal_cred_locked(clp);
spin_unlock(&clp->cl_lock);
if (cred == NULL) {
- if (!nfs_delegations_present(clp)) {
+ if (!(renew_flags & NFS4_RENEW_DELEGATION_CB)) {
set_bit(NFS4CLNT_LEASE_EXPIRED, &clp->cl_state);
goto out;
}
nfs_expire_all_delegations(clp);
} else {
/* Queue an asynchronous RENEW. */
- ops->sched_state_renewal(clp, cred);
+ ops->sched_state_renewal(clp, cred, renew_flags);
put_rpccred(cred);
goto out_exp;
}