aboutsummaryrefslogtreecommitdiffstats
path: root/fs/nfsd
diff options
context:
space:
mode:
authorStanislav Kinsbursky <skinsbursky@parallels.com>2012-07-25 08:57:06 -0400
committerJ. Bruce Fields <bfields@redhat.com>2012-07-27 16:49:21 -0400
commit9695c7057f4887ed54dc1e6c2ef22f72a2be1175 (patch)
treea9ca62e819e904d9b53629f1b7c45126416a2395 /fs/nfsd
parent5e1533c7880bb0df98f71fa683979ec296aa947d (diff)
SUNRPC: service request network namespace helper introduced
This is a cleanup patch - makes code looks simplier. It replaces widely used rqstp->rq_xprt->xpt_net by introduced SVC_NET(rqstp). Signed-off-by: Stanislav Kinsbursky <skinsbursky@parallels.com> Signed-off-by: J. Bruce Fields <bfields@redhat.com>
Diffstat (limited to 'fs/nfsd')
-rw-r--r--fs/nfsd/export.c4
-rw-r--r--fs/nfsd/nfs4idmap.c4
2 files changed, 4 insertions, 4 deletions
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 *
929rqst_exp_get_by_name(struct svc_rqst *rqstp, struct path *path) 929rqst_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 *
960rqst_exp_find(struct svc_rqst *rqstp, int fsid_type, u32 *fsidv) 960rqst_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);