diff options
author | Stanislav Kinsbursky <skinsbursky@parallels.com> | 2013-02-04 06:02:55 -0500 |
---|---|---|
committer | J. Bruce Fields <bfields@redhat.com> | 2013-02-15 10:43:47 -0500 |
commit | 21cd1254d3402a72927ed744e8ac1a7cf532f1ea (patch) | |
tree | 614baf2ba9099118ff94c3954fa5f22dcb75a086 /net/sunrpc/cache.c | |
parent | 2d4383383b0b04ca380b67aa2d7397d0b399dcbf (diff) |
SUNRPC: remove "cache_request" argument in sunrpc_cache_pipe_upcall() function
Passing this pointer is redundant since it's stored on cache_detail structure,
which is also passed to sunrpc_cache_pipe_upcall () function.
Signed-off-by: Stanislav Kinsbursky <skinsbursky@parallels.com>
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
Diffstat (limited to 'net/sunrpc/cache.c')
-rw-r--r-- | net/sunrpc/cache.c | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/net/sunrpc/cache.c b/net/sunrpc/cache.c index 51853d8ed0bc..8ffec5aebeff 100644 --- a/net/sunrpc/cache.c +++ b/net/sunrpc/cache.c | |||
@@ -198,7 +198,7 @@ static int cache_make_upcall(struct cache_detail *cd, struct cache_head *h) | |||
198 | { | 198 | { |
199 | if (cd->cache_upcall) | 199 | if (cd->cache_upcall) |
200 | return cd->cache_upcall(cd, h); | 200 | return cd->cache_upcall(cd, h); |
201 | return sunrpc_cache_pipe_upcall(cd, h, cd->cache_request); | 201 | return sunrpc_cache_pipe_upcall(cd, h); |
202 | } | 202 | } |
203 | 203 | ||
204 | static inline int cache_is_valid(struct cache_detail *detail, struct cache_head *h) | 204 | static inline int cache_is_valid(struct cache_detail *detail, struct cache_head *h) |
@@ -1140,11 +1140,7 @@ static bool cache_listeners_exist(struct cache_detail *detail) | |||
1140 | * | 1140 | * |
1141 | * Each request is at most one page long. | 1141 | * Each request is at most one page long. |
1142 | */ | 1142 | */ |
1143 | int sunrpc_cache_pipe_upcall(struct cache_detail *detail, struct cache_head *h, | 1143 | int sunrpc_cache_pipe_upcall(struct cache_detail *detail, struct cache_head *h) |
1144 | void (*cache_request)(struct cache_detail *, | ||
1145 | struct cache_head *, | ||
1146 | char **, | ||
1147 | int *)) | ||
1148 | { | 1144 | { |
1149 | 1145 | ||
1150 | char *buf; | 1146 | char *buf; |
@@ -1172,7 +1168,7 @@ int sunrpc_cache_pipe_upcall(struct cache_detail *detail, struct cache_head *h, | |||
1172 | 1168 | ||
1173 | bp = buf; len = PAGE_SIZE; | 1169 | bp = buf; len = PAGE_SIZE; |
1174 | 1170 | ||
1175 | cache_request(detail, h, &bp, &len); | 1171 | detail->cache_request(detail, h, &bp, &len); |
1176 | 1172 | ||
1177 | if (len < 0) { | 1173 | if (len < 0) { |
1178 | kfree(buf); | 1174 | kfree(buf); |