summaryrefslogtreecommitdiffstats
path: root/net/sunrpc
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 /net/sunrpc
parent462b8f6bf1d3f5feb7a346394036dbc1df3a8ed5 (diff)
downloadlinux-73fb847a44224d5708550e4be7baba9da75e00af.tar.gz
linux-73fb847a44224d5708550e4be7baba9da75e00af.tar.bz2
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 'net/sunrpc')
-rw-r--r--net/sunrpc/auth_gss/svcauth_gss.c3
-rw-r--r--net/sunrpc/svcauth_unix.c6
2 files changed, 6 insertions, 3 deletions
diff --git a/net/sunrpc/auth_gss/svcauth_gss.c b/net/sunrpc/auth_gss/svcauth_gss.c
index a5b41e2ac25a..1b0df530b59d 100644
--- a/net/sunrpc/auth_gss/svcauth_gss.c
+++ b/net/sunrpc/auth_gss/svcauth_gss.c
@@ -184,7 +184,7 @@ static void rsi_request(struct cache_detail *cd,
static int rsi_upcall(struct cache_detail *cd, struct cache_head *h)
{
- return sunrpc_cache_pipe_upcall(cd, h, rsi_request);
+ return sunrpc_cache_pipe_upcall(cd, h, cd->cache_request);
}
@@ -276,6 +276,7 @@ static struct cache_detail rsi_cache_template = {
.name = "auth.rpcsec.init",
.cache_put = rsi_put,
.cache_upcall = rsi_upcall,
+ .cache_request = rsi_request,
.cache_parse = rsi_parse,
.match = rsi_match,
.init = rsi_init,
diff --git a/net/sunrpc/svcauth_unix.c b/net/sunrpc/svcauth_unix.c
index ce34c8e5b8eb..18b8742eaa50 100644
--- a/net/sunrpc/svcauth_unix.c
+++ b/net/sunrpc/svcauth_unix.c
@@ -159,7 +159,7 @@ static void ip_map_request(struct cache_detail *cd,
static int ip_map_upcall(struct cache_detail *cd, struct cache_head *h)
{
- return sunrpc_cache_pipe_upcall(cd, h, ip_map_request);
+ return sunrpc_cache_pipe_upcall(cd, h, cd->cache_request);
}
static struct ip_map *__ip_map_lookup(struct cache_detail *cd, char *class, struct in6_addr *addr);
@@ -472,7 +472,7 @@ static void unix_gid_request(struct cache_detail *cd,
static int unix_gid_upcall(struct cache_detail *cd, struct cache_head *h)
{
- return sunrpc_cache_pipe_upcall(cd, h, unix_gid_request);
+ return sunrpc_cache_pipe_upcall(cd, h, cd->cache_request);
}
static struct unix_gid *unix_gid_lookup(struct cache_detail *cd, uid_t uid);
@@ -578,6 +578,7 @@ static struct cache_detail unix_gid_cache_template = {
.name = "auth.unix.gid",
.cache_put = unix_gid_put,
.cache_upcall = unix_gid_upcall,
+ .cache_request = unix_gid_request,
.cache_parse = unix_gid_parse,
.cache_show = unix_gid_show,
.match = unix_gid_match,
@@ -875,6 +876,7 @@ static struct cache_detail ip_map_cache_template = {
.name = "auth.unix.ip",
.cache_put = ip_map_put,
.cache_upcall = ip_map_upcall,
+ .cache_request = ip_map_request,
.cache_parse = ip_map_parse,
.cache_show = ip_map_show,
.match = ip_map_match,