|
@@ -5171,7 +5171,7 @@ int nfs4_proc_exchange_id(struct nfs_client *clp, struct rpc_cred *cred)
|
|
.flags = EXCHGID4_FLAG_SUPP_MOVED_REFER,
|
|
.flags = EXCHGID4_FLAG_SUPP_MOVED_REFER,
|
|
};
|
|
};
|
|
struct nfs41_exchange_id_res res = {
|
|
struct nfs41_exchange_id_res res = {
|
|
- .client = clp,
|
|
|
|
|
|
+ 0
|
|
};
|
|
};
|
|
int status;
|
|
int status;
|
|
struct rpc_message msg = {
|
|
struct rpc_message msg = {
|
|
@@ -5214,22 +5214,22 @@ int nfs4_proc_exchange_id(struct nfs_client *clp, struct rpc_cred *cred)
|
|
|
|
|
|
status = rpc_call_sync(clp->cl_rpcclient, &msg, RPC_TASK_TIMEOUT);
|
|
status = rpc_call_sync(clp->cl_rpcclient, &msg, RPC_TASK_TIMEOUT);
|
|
if (status == 0)
|
|
if (status == 0)
|
|
- status = nfs4_check_cl_exchange_flags(clp->cl_exchange_flags);
|
|
|
|
|
|
+ status = nfs4_check_cl_exchange_flags(res.flags);
|
|
|
|
|
|
if (status == 0) {
|
|
if (status == 0) {
|
|
|
|
+ clp->cl_clientid = res.clientid;
|
|
|
|
+ clp->cl_exchange_flags = (res.flags & ~EXCHGID4_FLAG_CONFIRMED_R);
|
|
|
|
+ if (!(res.flags & EXCHGID4_FLAG_CONFIRMED_R))
|
|
|
|
+ clp->cl_seqid = res.seqid;
|
|
|
|
+
|
|
kfree(clp->cl_serverowner);
|
|
kfree(clp->cl_serverowner);
|
|
clp->cl_serverowner = res.server_owner;
|
|
clp->cl_serverowner = res.server_owner;
|
|
res.server_owner = NULL;
|
|
res.server_owner = NULL;
|
|
- }
|
|
|
|
|
|
|
|
- if (status == 0) {
|
|
|
|
/* use the most recent implementation id */
|
|
/* use the most recent implementation id */
|
|
kfree(clp->cl_implid);
|
|
kfree(clp->cl_implid);
|
|
clp->cl_implid = res.impl_id;
|
|
clp->cl_implid = res.impl_id;
|
|
- } else
|
|
|
|
- kfree(res.impl_id);
|
|
|
|
|
|
|
|
- if (status == 0) {
|
|
|
|
if (clp->cl_serverscope != NULL &&
|
|
if (clp->cl_serverscope != NULL &&
|
|
!nfs41_same_server_scope(clp->cl_serverscope,
|
|
!nfs41_same_server_scope(clp->cl_serverscope,
|
|
res.server_scope)) {
|
|
res.server_scope)) {
|
|
@@ -5244,7 +5244,8 @@ int nfs4_proc_exchange_id(struct nfs_client *clp, struct rpc_cred *cred)
|
|
clp->cl_serverscope = res.server_scope;
|
|
clp->cl_serverscope = res.server_scope;
|
|
goto out;
|
|
goto out;
|
|
}
|
|
}
|
|
- }
|
|
|
|
|
|
+ } else
|
|
|
|
+ kfree(res.impl_id);
|
|
|
|
|
|
out_server_owner:
|
|
out_server_owner:
|
|
kfree(res.server_owner);
|
|
kfree(res.server_owner);
|