diff options
author | Trond Myklebust <Trond.Myklebust@netapp.com> | 2012-03-27 18:31:25 -0400 |
---|---|---|
committer | Trond Myklebust <Trond.Myklebust@netapp.com> | 2012-03-27 21:53:14 -0400 |
commit | 14977489ffdb80d4caf5a184ba41b23b02fbacd9 (patch) | |
tree | 8d0b755ca35743e6a00dc7da04a7b7c21dd6d650 /fs | |
parent | e59d27e05a6435f8c04d5ad843f37fa795f2eaaa (diff) |
NFSv4: Minor cleanups for nfs4_handle_exception and nfs4_async_handle_error
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'fs')
-rw-r--r-- | fs/nfs/nfs4proc.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c index 1933e6719bb0..f82bde005a82 100644 --- a/fs/nfs/nfs4proc.c +++ b/fs/nfs/nfs4proc.c | |||
@@ -270,7 +270,7 @@ static int nfs4_handle_exception(struct nfs_server *server, int errorcode, struc | |||
270 | case 0: | 270 | case 0: |
271 | return 0; | 271 | return 0; |
272 | case -NFS4ERR_OPENMODE: | 272 | case -NFS4ERR_OPENMODE: |
273 | if (nfs_have_delegation(inode, FMODE_READ)) { | 273 | if (inode && nfs_have_delegation(inode, FMODE_READ)) { |
274 | nfs_inode_return_delegation(inode); | 274 | nfs_inode_return_delegation(inode); |
275 | exception->retry = 1; | 275 | exception->retry = 1; |
276 | return 0; | 276 | return 0; |
@@ -282,10 +282,9 @@ static int nfs4_handle_exception(struct nfs_server *server, int errorcode, struc | |||
282 | case -NFS4ERR_DELEG_REVOKED: | 282 | case -NFS4ERR_DELEG_REVOKED: |
283 | case -NFS4ERR_ADMIN_REVOKED: | 283 | case -NFS4ERR_ADMIN_REVOKED: |
284 | case -NFS4ERR_BAD_STATEID: | 284 | case -NFS4ERR_BAD_STATEID: |
285 | if (state != NULL) | ||
286 | nfs_remove_bad_delegation(state->inode); | ||
287 | if (state == NULL) | 285 | if (state == NULL) |
288 | break; | 286 | break; |
287 | nfs_remove_bad_delegation(state->inode); | ||
289 | nfs4_schedule_stateid_recovery(server, state); | 288 | nfs4_schedule_stateid_recovery(server, state); |
290 | goto wait_on_recovery; | 289 | goto wait_on_recovery; |
291 | case -NFS4ERR_EXPIRED: | 290 | case -NFS4ERR_EXPIRED: |
@@ -3825,8 +3824,9 @@ nfs4_async_handle_error(struct rpc_task *task, const struct nfs_server *server, | |||
3825 | case -NFS4ERR_DELEG_REVOKED: | 3824 | case -NFS4ERR_DELEG_REVOKED: |
3826 | case -NFS4ERR_ADMIN_REVOKED: | 3825 | case -NFS4ERR_ADMIN_REVOKED: |
3827 | case -NFS4ERR_BAD_STATEID: | 3826 | case -NFS4ERR_BAD_STATEID: |
3828 | if (state != NULL) | 3827 | if (state == NULL) |
3829 | nfs_remove_bad_delegation(state->inode); | 3828 | break; |
3829 | nfs_remove_bad_delegation(state->inode); | ||
3830 | case -NFS4ERR_OPENMODE: | 3830 | case -NFS4ERR_OPENMODE: |
3831 | if (state == NULL) | 3831 | if (state == NULL) |
3832 | break; | 3832 | break; |