SUNRPC: remove "cache_request" argument in sunrpc_cache_pipe_upcall() function
authorStanislav Kinsbursky <skinsbursky@parallels.com>
Mon, 4 Feb 2013 11:02:55 +0000 (14:02 +0300)
committerJ. Bruce Fields <bfields@redhat.com>
Fri, 15 Feb 2013 15:43:47 +0000 (10:43 -0500)
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>
fs/nfs/dns_resolve.c
include/linux/sunrpc/cache.h
net/sunrpc/cache.c

index 55bc5d11457cac9998377179050f47a886a79680..9455270922958f420a7f31101cac1b6ac7b14bfb 100644 (file)
@@ -144,7 +144,7 @@ static int nfs_dns_upcall(struct cache_detail *cd,
 
        ret = nfs_cache_upcall(cd, key->hostname);
        if (ret)
-               ret = sunrpc_cache_pipe_upcall(cd, ch, cd->cache_request);
+               ret = sunrpc_cache_pipe_upcall(cd, ch);
        return ret;
 }
 
index 4f1c8582053c262485c63d9e75db078df0103aa6..303399b1ba5954a6de412114b15df8fc0def1514 100644 (file)
@@ -161,11 +161,7 @@ sunrpc_cache_update(struct cache_detail *detail,
                    struct cache_head *new, struct cache_head *old, int hash);
 
 extern int
-sunrpc_cache_pipe_upcall(struct cache_detail *detail, struct cache_head *h,
-               void (*cache_request)(struct cache_detail *,
-                                     struct cache_head *,
-                                     char **,
-                                     int *));
+sunrpc_cache_pipe_upcall(struct cache_detail *detail, struct cache_head *h);
 
 
 extern void cache_clean_deferred(void *owner);
index 51853d8ed0bcc17dacb70a7e2c0f35f359a750bd..8ffec5aebeff1294de2232dbebed7a5604d462ba 100644 (file)
@@ -198,7 +198,7 @@ static int cache_make_upcall(struct cache_detail *cd, struct cache_head *h)
 {
        if (cd->cache_upcall)
                return cd->cache_upcall(cd, h);
-       return sunrpc_cache_pipe_upcall(cd, h, cd->cache_request);
+       return sunrpc_cache_pipe_upcall(cd, h);
 }
 
 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)
  *
  * Each request is at most one page long.
  */
-int sunrpc_cache_pipe_upcall(struct cache_detail *detail, struct cache_head *h,
-               void (*cache_request)(struct cache_detail *,
-                                     struct cache_head *,
-                                     char **,
-                                     int *))
+int sunrpc_cache_pipe_upcall(struct cache_detail *detail, struct cache_head *h)
 {
 
        char *buf;
@@ -1172,7 +1168,7 @@ int sunrpc_cache_pipe_upcall(struct cache_detail *detail, struct cache_head *h,
 
        bp = buf; len = PAGE_SIZE;
 
-       cache_request(detail, h, &bp, &len);
+       detail->cache_request(detail, h, &bp, &len);
 
        if (len < 0) {
                kfree(buf);