summaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorStanislav Kinsbursky <skinsbursky@parallels.com>2013-02-04 14:02:45 +0300
committerJ. Bruce Fields <bfields@redhat.com>2013-02-15 10:43:45 -0500
commit73fb847a44224d5708550e4be7baba9da75e00af (patch)
tree28046833f31b29bcea2a0af5e14d3d5c34723423 /fs
parent462b8f6bf1d3f5feb7a346394036dbc1df3a8ed5 (diff)
downloadop-kernel-dev-73fb847a44224d5708550e4be7baba9da75e00af.zip
op-kernel-dev-73fb847a44224d5708550e4be7baba9da75e00af.tar.gz
SUNRPC: introduce cache_detail->cache_request callback
This callback will allow to simplify upcalls in further patches in this series. Signed-off-by: Stanislav Kinsbursky <skinsbursky@parallels.com> Signed-off-by: J. Bruce Fields <bfields@redhat.com>
Diffstat (limited to 'fs')
-rw-r--r--fs/nfs/dns_resolve.c3
-rw-r--r--fs/nfsd/export.c6
-rw-r--r--fs/nfsd/nfs4idmap.c6
3 files changed, 10 insertions, 5 deletions
diff --git a/fs/nfs/dns_resolve.c b/fs/nfs/dns_resolve.c
index 9cbc98a..55bc5d1 100644
--- a/fs/nfs/dns_resolve.c
+++ b/fs/nfs/dns_resolve.c
@@ -144,7 +144,7 @@ static int nfs_dns_upcall(struct cache_detail *cd,
ret = nfs_cache_upcall(cd, key->hostname);
if (ret)
- ret = sunrpc_cache_pipe_upcall(cd, ch, nfs_dns_request);
+ ret = sunrpc_cache_pipe_upcall(cd, ch, cd->cache_request);
return ret;
}
@@ -359,6 +359,7 @@ static struct cache_detail nfs_dns_resolve_template = {
.name = "dns_resolve",
.cache_put = nfs_dns_ent_put,
.cache_upcall = nfs_dns_upcall,
+ .cache_request = nfs_dns_request,
.cache_parse = nfs_dns_parse,
.cache_show = nfs_dns_show,
.match = nfs_dns_match,
diff --git a/fs/nfsd/export.c b/fs/nfsd/export.c
index 8e9df45..0e16c7f 100644
--- a/fs/nfsd/export.c
+++ b/fs/nfsd/export.c
@@ -69,7 +69,7 @@ static void expkey_request(struct cache_detail *cd,
static int expkey_upcall(struct cache_detail *cd, struct cache_head *h)
{
- return sunrpc_cache_pipe_upcall(cd, h, expkey_request);
+ return sunrpc_cache_pipe_upcall(cd, h, cd->cache_request);
}
static struct svc_expkey *svc_expkey_update(struct cache_detail *cd, struct svc_expkey *new,
@@ -246,6 +246,7 @@ static struct cache_detail svc_expkey_cache_template = {
.name = "nfsd.fh",
.cache_put = expkey_put,
.cache_upcall = expkey_upcall,
+ .cache_request = expkey_request,
.cache_parse = expkey_parse,
.cache_show = expkey_show,
.match = expkey_match,
@@ -340,7 +341,7 @@ static void svc_export_request(struct cache_detail *cd,
static int svc_export_upcall(struct cache_detail *cd, struct cache_head *h)
{
- return sunrpc_cache_pipe_upcall(cd, h, svc_export_request);
+ return sunrpc_cache_pipe_upcall(cd, h, cd->cache_request);
}
static struct svc_export *svc_export_update(struct svc_export *new,
@@ -714,6 +715,7 @@ static struct cache_detail svc_export_cache_template = {
.name = "nfsd.export",
.cache_put = svc_export_put,
.cache_upcall = svc_export_upcall,
+ .cache_request = svc_export_request,
.cache_parse = svc_export_parse,
.cache_show = svc_export_show,
.match = svc_export_match,
diff --git a/fs/nfsd/nfs4idmap.c b/fs/nfsd/nfs4idmap.c
index a1f10c0..9033dfd 100644
--- a/fs/nfsd/nfs4idmap.c
+++ b/fs/nfsd/nfs4idmap.c
@@ -142,7 +142,7 @@ idtoname_request(struct cache_detail *cd, struct cache_head *ch, char **bpp,
static int
idtoname_upcall(struct cache_detail *cd, struct cache_head *ch)
{
- return sunrpc_cache_pipe_upcall(cd, ch, idtoname_request);
+ return sunrpc_cache_pipe_upcall(cd, ch, cd->cache_request);
}
static int
@@ -193,6 +193,7 @@ static struct cache_detail idtoname_cache_template = {
.name = "nfs4.idtoname",
.cache_put = ent_put,
.cache_upcall = idtoname_upcall,
+ .cache_request = idtoname_request,
.cache_parse = idtoname_parse,
.cache_show = idtoname_show,
.warn_no_listener = warn_no_idmapd,
@@ -323,7 +324,7 @@ nametoid_request(struct cache_detail *cd, struct cache_head *ch, char **bpp,
static int
nametoid_upcall(struct cache_detail *cd, struct cache_head *ch)
{
- return sunrpc_cache_pipe_upcall(cd, ch, nametoid_request);
+ return sunrpc_cache_pipe_upcall(cd, ch, cd->cache_request);
}
static int
@@ -366,6 +367,7 @@ static struct cache_detail nametoid_cache_template = {
.name = "nfs4.nametoid",
.cache_put = ent_put,
.cache_upcall = nametoid_upcall,
+ .cache_request = nametoid_request,
.cache_parse = nametoid_parse,
.cache_show = nametoid_show,
.warn_no_listener = warn_no_idmapd,
OpenPOWER on IntegriCloud