aboutsummaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorTrond Myklebust <Trond.Myklebust@netapp.com>2009-05-26 14:51:00 -0400
committerTrond Myklebust <Trond.Myklebust@netapp.com>2009-05-26 14:51:00 -0400
commit95baa25c7321eb8613246acbf61b97911cc748d3 (patch)
tree3aea4952f4721c2c456ac2b5d056c8db34dd2e6d /fs
parentd0367a508af9cf97beb202935bb9ad8883d30cd1 (diff)
NFSv4: Fix the case where NFSv4 renewal fails
If the asynchronous lease renewal fails (usually due to a soft timeout), then we _must_ schedule state recovery in order to ensure that we don't lose the lease unnecessarily or, if the lease is already lost, that we recover the locking state promptly... Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'fs')
-rw-r--r--fs/nfs/nfs4proc.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c
index a4d242680299..4674f8092da8 100644
--- a/fs/nfs/nfs4proc.c
+++ b/fs/nfs/nfs4proc.c
@@ -2594,12 +2594,9 @@ static void nfs4_renew_done(struct rpc_task *task, void *data)
2594 unsigned long timestamp = (unsigned long)data; 2594 unsigned long timestamp = (unsigned long)data;
2595 2595
2596 if (task->tk_status < 0) { 2596 if (task->tk_status < 0) {
2597 switch (task->tk_status) { 2597 /* Unless we're shutting down, schedule state recovery! */
2598 case -NFS4ERR_STALE_CLIENTID: 2598 if (test_bit(NFS_CS_RENEWD, &clp->cl_res_state) != 0)
2599 case -NFS4ERR_EXPIRED: 2599 nfs4_schedule_state_recovery(clp);
2600 case -NFS4ERR_CB_PATH_DOWN:
2601 nfs4_schedule_state_recovery(clp);
2602 }
2603 return; 2600 return;
2604 } 2601 }
2605 spin_lock(&clp->cl_lock); 2602 spin_lock(&clp->cl_lock);