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

Commit bf674c82 authored by Trond Myklebust's avatar Trond Myklebust
Browse files

NFSv4.1: Handle errors in nfs4_bind_conn_to_session



Ensure that we handle NFS4ERR_DELAY errors separately, and then
let nfs4_recovery_handle_error() handle all other cases.

Signed-off-by: default avatarTrond Myklebust <Trond.Myklebust@netapp.com>
parent 43ac544c
Loading
Loading
Loading
Loading
+12 −1
Original line number Original line Diff line number Diff line
@@ -1788,7 +1788,17 @@ static int nfs4_bind_conn_to_session(struct nfs_client *clp)
	if (cred)
	if (cred)
		put_rpccred(cred);
		put_rpccred(cred);
	clear_bit(NFS4CLNT_BIND_CONN_TO_SESSION, &clp->cl_state);
	clear_bit(NFS4CLNT_BIND_CONN_TO_SESSION, &clp->cl_state);
	return ret;
	switch (ret) {
	case 0:
		break;
	case -NFS4ERR_DELAY:
		ssleep(1);
		set_bit(NFS4CLNT_BIND_CONN_TO_SESSION, &clp->cl_state);
		break;
	default:
		return nfs4_recovery_handle_error(clp, ret);
	}
	return 0;
}
}
#else /* CONFIG_NFS_V4_1 */
#else /* CONFIG_NFS_V4_1 */
static int nfs4_reset_session(struct nfs_client *clp) { return 0; }
static int nfs4_reset_session(struct nfs_client *clp) { return 0; }
@@ -1858,6 +1868,7 @@ static void nfs4_state_manager(struct nfs_client *clp)
			status = nfs4_bind_conn_to_session(clp);
			status = nfs4_bind_conn_to_session(clp);
			if (status < 0)
			if (status < 0)
				goto out_error;
				goto out_error;
			continue;
		}
		}


		/* First recover reboot state... */
		/* First recover reboot state... */