diff options
-rw-r--r-- | fs/lockd/host.c | 2 | ||||
-rw-r--r-- | fs/nfs/callback_xdr.c | 4 | ||||
-rw-r--r-- | fs/nfsd/export.c | 4 | ||||
-rw-r--r-- | fs/nfsd/nfs4idmap.c | 4 | ||||
-rw-r--r-- | include/linux/sunrpc/svc.h | 2 |
5 files changed, 9 insertions, 7 deletions
diff --git a/fs/lockd/host.c b/fs/lockd/host.c index 0084ab853a2b..f9b22e58f78f 100644 --- a/fs/lockd/host.c +++ b/fs/lockd/host.c | |||
@@ -331,7 +331,7 @@ struct nlm_host *nlmsvc_lookup_host(const struct svc_rqst *rqstp, | |||
331 | struct nsm_handle *nsm = NULL; | 331 | struct nsm_handle *nsm = NULL; |
332 | struct sockaddr *src_sap = svc_daddr(rqstp); | 332 | struct sockaddr *src_sap = svc_daddr(rqstp); |
333 | size_t src_len = rqstp->rq_daddrlen; | 333 | size_t src_len = rqstp->rq_daddrlen; |
334 | struct net *net = rqstp->rq_xprt->xpt_net; | 334 | struct net *net = SVC_NET(rqstp); |
335 | struct nlm_lookup_host_info ni = { | 335 | struct nlm_lookup_host_info ni = { |
336 | .server = 1, | 336 | .server = 1, |
337 | .sap = svc_addr(rqstp), | 337 | .sap = svc_addr(rqstp), |
diff --git a/fs/nfs/callback_xdr.c b/fs/nfs/callback_xdr.c index e64b01d2a338..742ff4ffced7 100644 --- a/fs/nfs/callback_xdr.c +++ b/fs/nfs/callback_xdr.c | |||
@@ -863,7 +863,7 @@ static __be32 nfs4_callback_compound(struct svc_rqst *rqstp, void *argp, void *r | |||
863 | .drc_status = 0, | 863 | .drc_status = 0, |
864 | .clp = NULL, | 864 | .clp = NULL, |
865 | .slotid = NFS4_NO_SLOT, | 865 | .slotid = NFS4_NO_SLOT, |
866 | .net = rqstp->rq_xprt->xpt_net, | 866 | .net = SVC_NET(rqstp), |
867 | }; | 867 | }; |
868 | unsigned int nops = 0; | 868 | unsigned int nops = 0; |
869 | 869 | ||
@@ -879,7 +879,7 @@ static __be32 nfs4_callback_compound(struct svc_rqst *rqstp, void *argp, void *r | |||
879 | return rpc_garbage_args; | 879 | return rpc_garbage_args; |
880 | 880 | ||
881 | if (hdr_arg.minorversion == 0) { | 881 | if (hdr_arg.minorversion == 0) { |
882 | cps.clp = nfs4_find_client_ident(rqstp->rq_xprt->xpt_net, hdr_arg.cb_ident); | 882 | cps.clp = nfs4_find_client_ident(SVC_NET(rqstp), hdr_arg.cb_ident); |
883 | if (!cps.clp || !check_gss_callback_principal(cps.clp, rqstp)) | 883 | if (!cps.clp || !check_gss_callback_principal(cps.clp, rqstp)) |
884 | return rpc_drop_reply; | 884 | return rpc_drop_reply; |
885 | } | 885 | } |
diff --git a/fs/nfsd/export.c b/fs/nfsd/export.c index 1114463bb856..a3946cf13fc8 100644 --- a/fs/nfsd/export.c +++ b/fs/nfsd/export.c | |||
@@ -929,7 +929,7 @@ struct svc_export * | |||
929 | rqst_exp_get_by_name(struct svc_rqst *rqstp, struct path *path) | 929 | rqst_exp_get_by_name(struct svc_rqst *rqstp, struct path *path) |
930 | { | 930 | { |
931 | struct svc_export *gssexp, *exp = ERR_PTR(-ENOENT); | 931 | struct svc_export *gssexp, *exp = ERR_PTR(-ENOENT); |
932 | struct nfsd_net *nn = net_generic(rqstp->rq_xprt->xpt_net, nfsd_net_id); | 932 | struct nfsd_net *nn = net_generic(SVC_NET(rqstp), nfsd_net_id); |
933 | struct cache_detail *cd = nn->svc_export_cache; | 933 | struct cache_detail *cd = nn->svc_export_cache; |
934 | 934 | ||
935 | if (rqstp->rq_client == NULL) | 935 | if (rqstp->rq_client == NULL) |
@@ -960,7 +960,7 @@ struct svc_export * | |||
960 | rqst_exp_find(struct svc_rqst *rqstp, int fsid_type, u32 *fsidv) | 960 | rqst_exp_find(struct svc_rqst *rqstp, int fsid_type, u32 *fsidv) |
961 | { | 961 | { |
962 | struct svc_export *gssexp, *exp = ERR_PTR(-ENOENT); | 962 | struct svc_export *gssexp, *exp = ERR_PTR(-ENOENT); |
963 | struct nfsd_net *nn = net_generic(rqstp->rq_xprt->xpt_net, nfsd_net_id); | 963 | struct nfsd_net *nn = net_generic(SVC_NET(rqstp), nfsd_net_id); |
964 | struct cache_detail *cd = nn->svc_export_cache; | 964 | struct cache_detail *cd = nn->svc_export_cache; |
965 | 965 | ||
966 | if (rqstp->rq_client == NULL) | 966 | if (rqstp->rq_client == NULL) |
diff --git a/fs/nfsd/nfs4idmap.c b/fs/nfsd/nfs4idmap.c index dae36f1dee95..fdc91a6fc9c4 100644 --- a/fs/nfsd/nfs4idmap.c +++ b/fs/nfsd/nfs4idmap.c | |||
@@ -546,7 +546,7 @@ idmap_name_to_id(struct svc_rqst *rqstp, int type, const char *name, u32 namelen | |||
546 | .type = type, | 546 | .type = type, |
547 | }; | 547 | }; |
548 | int ret; | 548 | int ret; |
549 | struct nfsd_net *nn = net_generic(rqstp->rq_xprt->xpt_net, nfsd_net_id); | 549 | struct nfsd_net *nn = net_generic(SVC_NET(rqstp), nfsd_net_id); |
550 | 550 | ||
551 | if (namelen + 1 > sizeof(key.name)) | 551 | if (namelen + 1 > sizeof(key.name)) |
552 | return nfserr_badowner; | 552 | return nfserr_badowner; |
@@ -571,7 +571,7 @@ idmap_id_to_name(struct svc_rqst *rqstp, int type, uid_t id, char *name) | |||
571 | .type = type, | 571 | .type = type, |
572 | }; | 572 | }; |
573 | int ret; | 573 | int ret; |
574 | struct nfsd_net *nn = net_generic(rqstp->rq_xprt->xpt_net, nfsd_net_id); | 574 | struct nfsd_net *nn = net_generic(SVC_NET(rqstp), nfsd_net_id); |
575 | 575 | ||
576 | strlcpy(key.authname, rqst_authname(rqstp), sizeof(key.authname)); | 576 | strlcpy(key.authname, rqst_authname(rqstp), sizeof(key.authname)); |
577 | ret = idmap_lookup(rqstp, idtoname_lookup, &key, nn->idtoname_cache, &item); | 577 | ret = idmap_lookup(rqstp, idtoname_lookup, &key, nn->idtoname_cache, &item); |
diff --git a/include/linux/sunrpc/svc.h b/include/linux/sunrpc/svc.h index 40e0a273faea..d83db800fe02 100644 --- a/include/linux/sunrpc/svc.h +++ b/include/linux/sunrpc/svc.h | |||
@@ -278,6 +278,8 @@ struct svc_rqst { | |||
278 | struct task_struct *rq_task; /* service thread */ | 278 | struct task_struct *rq_task; /* service thread */ |
279 | }; | 279 | }; |
280 | 280 | ||
281 | #define SVC_NET(svc_rqst) (svc_rqst->rq_xprt->xpt_net) | ||
282 | |||
281 | /* | 283 | /* |
282 | * Rigorous type checking on sockaddr type conversions | 284 | * Rigorous type checking on sockaddr type conversions |
283 | */ | 285 | */ |