diff options
author | Ricardo Labiaga <Ricardo.Labiaga@netapp.com> | 2009-12-07 09:23:21 -0500 |
---|---|---|
committer | Trond Myklebust <Trond.Myklebust@netapp.com> | 2009-12-07 09:23:21 -0500 |
commit | 79708861189eb89dea6711bd0464b097b69e7c79 (patch) | |
tree | 252f824d3e4af97e0da64dfadc4b94544c611380 /fs/nfs/nfs4proc.c | |
parent | bcfa49f6f931ce4097309ca8501d842a6f0ac860 (diff) |
nfs41: Retry delegation return if it failed with session error
Update nfs4_delegreturn_done() to retry the operation after setting the
NFS4CLNT_SESSION_SETUP bit to indicate the need to reset the session.
Signed-off-by: Ricardo Labiaga <Ricardo.Labiaga@netapp.com>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'fs/nfs/nfs4proc.c')
-rw-r--r-- | fs/nfs/nfs4proc.c | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c index 96dfff12736d..d8c2ceb303d1 100644 --- a/fs/nfs/nfs4proc.c +++ b/fs/nfs/nfs4proc.c | |||
@@ -3479,9 +3479,20 @@ static void nfs4_delegreturn_done(struct rpc_task *task, void *calldata) | |||
3479 | nfs4_sequence_done(data->res.server, &data->res.seq_res, | 3479 | nfs4_sequence_done(data->res.server, &data->res.seq_res, |
3480 | task->tk_status); | 3480 | task->tk_status); |
3481 | 3481 | ||
3482 | data->rpc_status = task->tk_status; | 3482 | switch (task->tk_status) { |
3483 | if (data->rpc_status == 0) | 3483 | case -NFS4ERR_STALE_STATEID: |
3484 | case -NFS4ERR_EXPIRED: | ||
3485 | case 0: | ||
3484 | renew_lease(data->res.server, data->timestamp); | 3486 | renew_lease(data->res.server, data->timestamp); |
3487 | break; | ||
3488 | default: | ||
3489 | if (nfs4_async_handle_error(task, data->res.server, NULL) == | ||
3490 | -EAGAIN) { | ||
3491 | nfs_restart_rpc(task, data->res.server->nfs_client); | ||
3492 | return; | ||
3493 | } | ||
3494 | } | ||
3495 | data->rpc_status = task->tk_status; | ||
3485 | } | 3496 | } |
3486 | 3497 | ||
3487 | static void nfs4_delegreturn_release(void *calldata) | 3498 | static void nfs4_delegreturn_release(void *calldata) |