diff options
author | Trond Myklebust <Trond.Myklebust@netapp.com> | 2009-06-17 16:22:58 -0400 |
---|---|---|
committer | Trond Myklebust <Trond.Myklebust@netapp.com> | 2009-06-17 16:22:58 -0400 |
commit | d5122201a7f90b2aa73092f158b84d1d74f1134d (patch) | |
tree | 7d2c55cd74dd31b5977861d0bc71b31424dc68ed /fs/nfs/nfs4proc.c | |
parent | 01c3f05228ce7fc19baa103e4e4bf6c1b5062a53 (diff) |
NFSv4: Move error handling out of the delegation generic code
The NFSv4 delegation recovery code is required by the protocol to handle
more errors. Rather than add NFSv4.0 specific errors into 'generic'
delegation code, we should move the error handling into the NFSv4 layer.
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 4674f8092da8..d326193c9785 100644 --- a/fs/nfs/nfs4proc.c +++ b/fs/nfs/nfs4proc.c | |||
@@ -3630,8 +3630,19 @@ int nfs4_lock_delegation_recall(struct nfs4_state *state, struct file_lock *fl) | |||
3630 | goto out; | 3630 | goto out; |
3631 | do { | 3631 | do { |
3632 | err = _nfs4_do_setlk(state, F_SETLK, fl, 0); | 3632 | err = _nfs4_do_setlk(state, F_SETLK, fl, 0); |
3633 | if (err != -NFS4ERR_DELAY) | 3633 | switch (err) { |
3634 | break; | 3634 | default: |
3635 | printk(KERN_ERR "%s: unhandled error %d.\n", | ||
3636 | __func__, err); | ||
3637 | case 0: | ||
3638 | goto out; | ||
3639 | case -NFS4ERR_EXPIRED: | ||
3640 | case -NFS4ERR_STALE_CLIENTID: | ||
3641 | nfs4_schedule_state_recovery(server->nfs_client); | ||
3642 | goto out; | ||
3643 | case -NFS4ERR_DELAY: | ||
3644 | break; | ||
3645 | } | ||
3635 | err = nfs4_handle_exception(server, err, &exception); | 3646 | err = nfs4_handle_exception(server, err, &exception); |
3636 | } while (exception.retry); | 3647 | } while (exception.retry); |
3637 | out: | 3648 | out: |