summaryrefslogtreecommitdiffstats
path: root/fs/nfs/nfs4filelayout.c
diff options
context:
space:
mode:
authorAndy Adamson2012-03-08 17:03:53 +0100
committerTrond Myklebust2012-03-08 17:05:48 +0100
commit2dc317565b6fd264929b41aaa9674431d75178ef (patch)
treedd944aeb038638086a6054f24cb0f74822cf1873 /fs/nfs/nfs4filelayout.c
parentNFSv4: Return the delegation if the server returns NFS4ERR_OPENMODE (diff)
downloadkernel-qcow2-linux-2dc317565b6fd264929b41aaa9674431d75178ef.tar.gz
kernel-qcow2-linux-2dc317565b6fd264929b41aaa9674431d75178ef.tar.xz
kernel-qcow2-linux-2dc317565b6fd264929b41aaa9674431d75178ef.zip
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/nfs4filelayout.c')
-rw-r--r--fs/nfs/nfs4filelayout.c9
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,
case -NFS4ERR_DELEG_REVOKED:
case -NFS4ERR_ADMIN_REVOKED:
case -NFS4ERR_BAD_STATEID:
- if (state != NULL)
- nfs_remove_bad_delegation(state->inode);
+ nfs_remove_bad_delegation(state->inode);
case -NFS4ERR_OPENMODE:
- if (state == NULL)
- break;
nfs4_schedule_stateid_recovery(mds_server, state);
goto wait_on_recovery;
case -NFS4ERR_EXPIRED:
- if (state != NULL)
- nfs4_schedule_stateid_recovery(mds_server, state);
+ nfs4_schedule_stateid_recovery(mds_server, state);
nfs4_schedule_lease_recovery(mds_client);
goto wait_on_recovery;
/* DS session errors */
@@ -145,7 +141,6 @@ wait_on_recovery:
if (test_bit(NFS4CLNT_MANAGER_RUNNING, &mds_client->cl_state) == 0)
rpc_wake_up_queued_task(&mds_client->cl_rpcwaitq, task);
goto out;
-
}
/* NFS_PROTO call done callback routines */