diff options
author | Trond Myklebust <Trond.Myklebust@netapp.com> | 2012-03-01 17:01:05 -0500 |
---|---|---|
committer | Trond Myklebust <Trond.Myklebust@netapp.com> | 2012-03-02 15:36:41 -0500 |
commit | 4e0038b6b246e4145fc4a53dca61a556d17bc52c (patch) | |
tree | 67055f0c5dca7a4a24b062b1320675ad468d7b69 /fs/nfs | |
parent | 2446ab6070861aba2dd9229463ffbc40016a9f33 (diff) |
SUNRPC: Move clnt->cl_server into struct rpc_xprt
When the cl_xprt field is updated, the cl_server field will also have
to change. Since the contents of cl_server follow the remote endpoint
of cl_xprt, just move that field to the rpc_xprt.
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
[ cel: simplify check_gss_callback_principal(), whitespace changes ]
[ cel: forward ported to 3.4 ]
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'fs/nfs')
-rw-r--r-- | fs/nfs/callback.c | 3 | ||||
-rw-r--r-- | fs/nfs/nfs4proc.c | 3 |
2 files changed, 3 insertions, 3 deletions
diff --git a/fs/nfs/callback.c b/fs/nfs/callback.c index 4a122ae71762..2afe23349c7b 100644 --- a/fs/nfs/callback.c +++ b/fs/nfs/callback.c | |||
@@ -332,7 +332,6 @@ void nfs_callback_down(int minorversion) | |||
332 | int | 332 | int |
333 | check_gss_callback_principal(struct nfs_client *clp, struct svc_rqst *rqstp) | 333 | check_gss_callback_principal(struct nfs_client *clp, struct svc_rqst *rqstp) |
334 | { | 334 | { |
335 | struct rpc_clnt *r = clp->cl_rpcclient; | ||
336 | char *p = svc_gss_principal(rqstp); | 335 | char *p = svc_gss_principal(rqstp); |
337 | 336 | ||
338 | if (rqstp->rq_authop->flavour != RPC_AUTH_GSS) | 337 | if (rqstp->rq_authop->flavour != RPC_AUTH_GSS) |
@@ -353,7 +352,7 @@ check_gss_callback_principal(struct nfs_client *clp, struct svc_rqst *rqstp) | |||
353 | if (memcmp(p, "nfs@", 4) != 0) | 352 | if (memcmp(p, "nfs@", 4) != 0) |
354 | return 0; | 353 | return 0; |
355 | p += 4; | 354 | p += 4; |
356 | if (strcmp(p, r->cl_server) != 0) | 355 | if (strcmp(p, clp->cl_hostname) != 0) |
357 | return 0; | 356 | return 0; |
358 | return 1; | 357 | return 1; |
359 | } | 358 | } |
diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c index 671510cc14c0..54767dd66cf9 100644 --- a/fs/nfs/nfs4proc.c +++ b/fs/nfs/nfs4proc.c | |||
@@ -1100,6 +1100,7 @@ static struct nfs4_state *nfs4_opendata_to_nfs4_state(struct nfs4_opendata *data | |||
1100 | if (state == NULL) | 1100 | if (state == NULL) |
1101 | goto err_put_inode; | 1101 | goto err_put_inode; |
1102 | if (data->o_res.delegation_type != 0) { | 1102 | if (data->o_res.delegation_type != 0) { |
1103 | struct nfs_client *clp = NFS_SERVER(inode)->nfs_client; | ||
1103 | int delegation_flags = 0; | 1104 | int delegation_flags = 0; |
1104 | 1105 | ||
1105 | rcu_read_lock(); | 1106 | rcu_read_lock(); |
@@ -1111,7 +1112,7 @@ static struct nfs4_state *nfs4_opendata_to_nfs4_state(struct nfs4_opendata *data | |||
1111 | pr_err_ratelimited("NFS: Broken NFSv4 server %s is " | 1112 | pr_err_ratelimited("NFS: Broken NFSv4 server %s is " |
1112 | "returning a delegation for " | 1113 | "returning a delegation for " |
1113 | "OPEN(CLAIM_DELEGATE_CUR)\n", | 1114 | "OPEN(CLAIM_DELEGATE_CUR)\n", |
1114 | NFS_CLIENT(inode)->cl_server); | 1115 | clp->cl_hostname); |
1115 | } else if ((delegation_flags & 1UL<<NFS_DELEGATION_NEED_RECLAIM) == 0) | 1116 | } else if ((delegation_flags & 1UL<<NFS_DELEGATION_NEED_RECLAIM) == 0) |
1116 | nfs_inode_set_delegation(state->inode, | 1117 | nfs_inode_set_delegation(state->inode, |
1117 | data->owner->so_cred, | 1118 | data->owner->so_cred, |