diff options
author | Stanislav Kinsbursky <skinsbursky@parallels.com> | 2013-02-04 06:02:45 -0500 |
---|---|---|
committer | J. Bruce Fields <bfields@redhat.com> | 2013-02-15 10:43:45 -0500 |
commit | 73fb847a44224d5708550e4be7baba9da75e00af (patch) | |
tree | 28046833f31b29bcea2a0af5e14d3d5c34723423 /net | |
parent | 462b8f6bf1d3f5feb7a346394036dbc1df3a8ed5 (diff) |
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')
-rw-r--r-- | net/sunrpc/auth_gss/svcauth_gss.c | 3 | ||||
-rw-r--r-- | net/sunrpc/svcauth_unix.c | 6 |
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, | |||
184 | 184 | ||
185 | static int rsi_upcall(struct cache_detail *cd, struct cache_head *h) | 185 | static int rsi_upcall(struct cache_detail *cd, struct cache_head *h) |
186 | { | 186 | { |
187 | return sunrpc_cache_pipe_upcall(cd, h, rsi_request); | 187 | return sunrpc_cache_pipe_upcall(cd, h, cd->cache_request); |
188 | } | 188 | } |
189 | 189 | ||
190 | 190 | ||
@@ -276,6 +276,7 @@ static struct cache_detail rsi_cache_template = { | |||
276 | .name = "auth.rpcsec.init", | 276 | .name = "auth.rpcsec.init", |
277 | .cache_put = rsi_put, | 277 | .cache_put = rsi_put, |
278 | .cache_upcall = rsi_upcall, | 278 | .cache_upcall = rsi_upcall, |
279 | .cache_request = rsi_request, | ||
279 | .cache_parse = rsi_parse, | 280 | .cache_parse = rsi_parse, |
280 | .match = rsi_match, | 281 | .match = rsi_match, |
281 | .init = rsi_init, | 282 | .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, | |||
159 | 159 | ||
160 | static int ip_map_upcall(struct cache_detail *cd, struct cache_head *h) | 160 | static int ip_map_upcall(struct cache_detail *cd, struct cache_head *h) |
161 | { | 161 | { |
162 | return sunrpc_cache_pipe_upcall(cd, h, ip_map_request); | 162 | return sunrpc_cache_pipe_upcall(cd, h, cd->cache_request); |
163 | } | 163 | } |
164 | 164 | ||
165 | static struct ip_map *__ip_map_lookup(struct cache_detail *cd, char *class, struct in6_addr *addr); | 165 | 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, | |||
472 | 472 | ||
473 | static int unix_gid_upcall(struct cache_detail *cd, struct cache_head *h) | 473 | static int unix_gid_upcall(struct cache_detail *cd, struct cache_head *h) |
474 | { | 474 | { |
475 | return sunrpc_cache_pipe_upcall(cd, h, unix_gid_request); | 475 | return sunrpc_cache_pipe_upcall(cd, h, cd->cache_request); |
476 | } | 476 | } |
477 | 477 | ||
478 | static struct unix_gid *unix_gid_lookup(struct cache_detail *cd, uid_t uid); | 478 | 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 = { | |||
578 | .name = "auth.unix.gid", | 578 | .name = "auth.unix.gid", |
579 | .cache_put = unix_gid_put, | 579 | .cache_put = unix_gid_put, |
580 | .cache_upcall = unix_gid_upcall, | 580 | .cache_upcall = unix_gid_upcall, |
581 | .cache_request = unix_gid_request, | ||
581 | .cache_parse = unix_gid_parse, | 582 | .cache_parse = unix_gid_parse, |
582 | .cache_show = unix_gid_show, | 583 | .cache_show = unix_gid_show, |
583 | .match = unix_gid_match, | 584 | .match = unix_gid_match, |
@@ -875,6 +876,7 @@ static struct cache_detail ip_map_cache_template = { | |||
875 | .name = "auth.unix.ip", | 876 | .name = "auth.unix.ip", |
876 | .cache_put = ip_map_put, | 877 | .cache_put = ip_map_put, |
877 | .cache_upcall = ip_map_upcall, | 878 | .cache_upcall = ip_map_upcall, |
879 | .cache_request = ip_map_request, | ||
878 | .cache_parse = ip_map_parse, | 880 | .cache_parse = ip_map_parse, |
879 | .cache_show = ip_map_show, | 881 | .cache_show = ip_map_show, |
880 | .match = ip_map_match, | 882 | .match = ip_map_match, |