|
@@ -5052,7 +5052,8 @@ out_inval:
|
|
}
|
|
}
|
|
|
|
|
|
static bool
|
|
static bool
|
|
-nfs41_same_server_scope(struct server_scope *a, struct server_scope *b)
|
|
|
|
|
|
+nfs41_same_server_scope(struct nfs41_server_scope *a,
|
|
|
|
+ struct nfs41_server_scope *b)
|
|
{
|
|
{
|
|
if (a->server_scope_sz == b->server_scope_sz &&
|
|
if (a->server_scope_sz == b->server_scope_sz &&
|
|
memcmp(a->server_scope, b->server_scope, a->server_scope_sz) == 0)
|
|
memcmp(a->server_scope, b->server_scope, a->server_scope_sz) == 0)
|
|
@@ -5099,7 +5100,8 @@ int nfs4_proc_exchange_id(struct nfs_client *clp, struct rpc_cred *cred)
|
|
clp->cl_rpcclient->cl_nodename,
|
|
clp->cl_rpcclient->cl_nodename,
|
|
clp->cl_rpcclient->cl_auth->au_flavor);
|
|
clp->cl_rpcclient->cl_auth->au_flavor);
|
|
|
|
|
|
- res.server_scope = kzalloc(sizeof(struct server_scope), GFP_KERNEL);
|
|
|
|
|
|
+ res.server_scope = kzalloc(sizeof(struct nfs41_server_scope),
|
|
|
|
+ GFP_KERNEL);
|
|
if (unlikely(!res.server_scope)) {
|
|
if (unlikely(!res.server_scope)) {
|
|
status = -ENOMEM;
|
|
status = -ENOMEM;
|
|
goto out;
|
|
goto out;
|
|
@@ -5123,18 +5125,18 @@ int nfs4_proc_exchange_id(struct nfs_client *clp, struct rpc_cred *cred)
|
|
kfree(res.impl_id);
|
|
kfree(res.impl_id);
|
|
|
|
|
|
if (!status) {
|
|
if (!status) {
|
|
- if (clp->server_scope &&
|
|
|
|
- !nfs41_same_server_scope(clp->server_scope,
|
|
|
|
|
|
+ if (clp->cl_serverscope &&
|
|
|
|
+ !nfs41_same_server_scope(clp->cl_serverscope,
|
|
res.server_scope)) {
|
|
res.server_scope)) {
|
|
dprintk("%s: server_scope mismatch detected\n",
|
|
dprintk("%s: server_scope mismatch detected\n",
|
|
__func__);
|
|
__func__);
|
|
set_bit(NFS4CLNT_SERVER_SCOPE_MISMATCH, &clp->cl_state);
|
|
set_bit(NFS4CLNT_SERVER_SCOPE_MISMATCH, &clp->cl_state);
|
|
- kfree(clp->server_scope);
|
|
|
|
- clp->server_scope = NULL;
|
|
|
|
|
|
+ kfree(clp->cl_serverscope);
|
|
|
|
+ clp->cl_serverscope = NULL;
|
|
}
|
|
}
|
|
|
|
|
|
- if (!clp->server_scope) {
|
|
|
|
- clp->server_scope = res.server_scope;
|
|
|
|
|
|
+ if (!clp->cl_serverscope) {
|
|
|
|
+ clp->cl_serverscope = res.server_scope;
|
|
goto out;
|
|
goto out;
|
|
}
|
|
}
|
|
}
|
|
}
|