Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 2dc31756 authored by Andy Adamson's avatar Andy Adamson Committed by Trond Myklebust
Browse files

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: default avatarAndy Adamson <andros@netapp.com>
Signed-off-by: default avatarTrond Myklebust <Trond.Myklebust@netapp.com>
parent 3114ea7a
Loading
Loading
Loading
Loading
+2 −7
Original line number Original line Diff line number Diff line
@@ -99,15 +99,11 @@ static int filelayout_async_handle_error(struct rpc_task *task,
	case -NFS4ERR_DELEG_REVOKED:
	case -NFS4ERR_DELEG_REVOKED:
	case -NFS4ERR_ADMIN_REVOKED:
	case -NFS4ERR_ADMIN_REVOKED:
	case -NFS4ERR_BAD_STATEID:
	case -NFS4ERR_BAD_STATEID:
		if (state != NULL)
		nfs_remove_bad_delegation(state->inode);
		nfs_remove_bad_delegation(state->inode);
	case -NFS4ERR_OPENMODE:
	case -NFS4ERR_OPENMODE:
		if (state == NULL)
			break;
		nfs4_schedule_stateid_recovery(mds_server, state);
		nfs4_schedule_stateid_recovery(mds_server, state);
		goto wait_on_recovery;
		goto wait_on_recovery;
	case -NFS4ERR_EXPIRED:
	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);
		nfs4_schedule_lease_recovery(mds_client);
		goto wait_on_recovery;
		goto wait_on_recovery;
@@ -145,7 +141,6 @@ wait_on_recovery:
	if (test_bit(NFS4CLNT_MANAGER_RUNNING, &mds_client->cl_state) == 0)
	if (test_bit(NFS4CLNT_MANAGER_RUNNING, &mds_client->cl_state) == 0)
		rpc_wake_up_queued_task(&mds_client->cl_rpcwaitq, task);
		rpc_wake_up_queued_task(&mds_client->cl_rpcwaitq, task);
	goto out;
	goto out;

}
}


/* NFS_PROTO call done callback routines */
/* NFS_PROTO call done callback routines */