summaryrefslogtreecommitdiffstats
path: root/fs/nfsd/nfs4idmap.c
diff options
context:
space:
mode:
authorStanislav Kinsbursky <skinsbursky@parallels.com>2013-02-04 12:02:45 +0100
committerJ. Bruce Fields <bfields@redhat.com>2013-02-15 16:43:45 +0100
commit73fb847a44224d5708550e4be7baba9da75e00af (patch)
tree28046833f31b29bcea2a0af5e14d3d5c34723423 /fs/nfsd/nfs4idmap.c
parentNFS: simplify and clean cache library (diff)
downloadlinux-73fb847a44224d5708550e4be7baba9da75e00af.tar.xz
linux-73fb847a44224d5708550e4be7baba9da75e00af.zip
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/nfsd/nfs4idmap.c')
-rw-r--r--fs/nfsd/nfs4idmap.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/fs/nfsd/nfs4idmap.c b/fs/nfsd/nfs4idmap.c
index a1f10c0a6255..9033dfde1812 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,