summaryrefslogtreecommitdiffstats
path: root/fs/nfs/nfs4renewd.c
diff options
context:
space:
mode:
authorArnd Bergmann <arnd@arndb.de>2011-10-17 11:22:50 +0000
committerArnd Bergmann <arnd@arndb.de>2011-10-17 11:22:50 +0000
commit8eb41582d2106eccc7717047d1184481f5a1b3a6 (patch)
tree12257bbe39b5c8ae6918198fde682ed0aacd8e00 /fs/nfs/nfs4renewd.c
parent127d4eb97b7bebc15fd692603263e75c220e24f9 (diff)
parent1cb17e2dbd09436069733500ea48e0c9b1f0a1cc (diff)
downloadop-kernel-dev-8eb41582d2106eccc7717047d1184481f5a1b3a6.zip
op-kernel-dev-8eb41582d2106eccc7717047d1184481f5a1b3a6.tar.gz
Merge branch 'ep93xx/board' into next/board
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 df8e7f3..dc484c0 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;
}
OpenPOWER on IntegriCloud