Skip to content

Commit

Permalink
NFSv4: Fix the case where NFSv4 renewal fails
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Trond Myklebust authored and Trond Myklebust committed May 26, 2009
1 parent d0367a5 commit 95baa25
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions fs/nfs/nfs4proc.c
Original file line number Diff line number Diff line change
Expand Up @@ -2594,12 +2594,9 @@ static void nfs4_renew_done(struct rpc_task *task, void *data)
unsigned long timestamp = (unsigned long)data;

if (task->tk_status < 0) {
switch (task->tk_status) {
case -NFS4ERR_STALE_CLIENTID:
case -NFS4ERR_EXPIRED:
case -NFS4ERR_CB_PATH_DOWN:
nfs4_schedule_state_recovery(clp);
}
/* Unless we're shutting down, schedule state recovery! */
if (test_bit(NFS_CS_RENEWD, &clp->cl_res_state) != 0)
nfs4_schedule_state_recovery(clp);
return;
}
spin_lock(&clp->cl_lock);
Expand Down

0 comments on commit 95baa25

Please sign in to comment.