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/sunrpc/svcauth_unix.c | |
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/sunrpc/svcauth_unix.c')
-rw-r--r-- | net/sunrpc/svcauth_unix.c | 6 |
1 files changed, 4 insertions, 2 deletions
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, |