diff options
author | Andy Adamson <andros@netapp.com> | 2012-03-08 11:03:53 -0500 |
---|---|---|
committer | Trond Myklebust <Trond.Myklebust@netapp.com> | 2012-03-08 11:05:48 -0500 |
commit | 2dc317565b6fd264929b41aaa9674431d75178ef (patch) | |
tree | dd944aeb038638086a6054f24cb0f74822cf1873 /fs/nfs | |
parent | 3114ea7a24d3264c090556a2444fc6d2c06176d4 (diff) |
NFSv4.1 cleanup DS stateid error handling
The error handler nfs4_state parameter is never NULL in the pNFS case as
the open_context must carry an nfs_state.
Signed-off-by: Andy Adamson <andros@netapp.com>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'fs/nfs')
-rw-r--r-- | fs/nfs/nfs4filelayout.c | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/fs/nfs/nfs4filelayout.c b/fs/nfs/nfs4filelayout.c index b2d3bb5971bb..768f6f86c9f0 100644 --- a/fs/nfs/nfs4filelayout.c +++ b/fs/nfs/nfs4filelayout.c | |||
@@ -99,16 +99,12 @@ static int filelayout_async_handle_error(struct rpc_task *task, | |||
99 | case -NFS4ERR_DELEG_REVOKED: | 99 | case -NFS4ERR_DELEG_REVOKED: |
100 | case -NFS4ERR_ADMIN_REVOKED: | 100 | case -NFS4ERR_ADMIN_REVOKED: |
101 | case -NFS4ERR_BAD_STATEID: | 101 | case -NFS4ERR_BAD_STATEID: |
102 | if (state != NULL) | 102 | nfs_remove_bad_delegation(state->inode); |
103 | nfs_remove_bad_delegation(state->inode); | ||
104 | case -NFS4ERR_OPENMODE: | 103 | case -NFS4ERR_OPENMODE: |
105 | if (state == NULL) | ||
106 | break; | ||
107 | nfs4_schedule_stateid_recovery(mds_server, state); | 104 | nfs4_schedule_stateid_recovery(mds_server, state); |
108 | goto wait_on_recovery; | 105 | goto wait_on_recovery; |
109 | case -NFS4ERR_EXPIRED: | 106 | case -NFS4ERR_EXPIRED: |
110 | if (state != NULL) | 107 | nfs4_schedule_stateid_recovery(mds_server, state); |
111 | nfs4_schedule_stateid_recovery(mds_server, state); | ||
112 | nfs4_schedule_lease_recovery(mds_client); | 108 | nfs4_schedule_lease_recovery(mds_client); |
113 | goto wait_on_recovery; | 109 | goto wait_on_recovery; |
114 | /* DS session errors */ | 110 | /* DS session errors */ |
@@ -145,7 +141,6 @@ wait_on_recovery: | |||
145 | if (test_bit(NFS4CLNT_MANAGER_RUNNING, &mds_client->cl_state) == 0) | 141 | if (test_bit(NFS4CLNT_MANAGER_RUNNING, &mds_client->cl_state) == 0) |
146 | rpc_wake_up_queued_task(&mds_client->cl_rpcwaitq, task); | 142 | rpc_wake_up_queued_task(&mds_client->cl_rpcwaitq, task); |
147 | goto out; | 143 | goto out; |
148 | |||
149 | } | 144 | } |
150 | 145 | ||
151 | /* NFS_PROTO call done callback routines */ | 146 | /* NFS_PROTO call done callback routines */ |