]> Pileus Git - ~andy/linux/blobdiff - net/sunrpc/auth.c
Merge branch 'upstream' of git://ftp.linux-mips.org/pub/scm/upstream-linus
[~andy/linux] / net / sunrpc / auth.c
index 74baf87ccff9dd7ea495b1ede6402d8880603dee..1ea27559b1deb43dbeb9613fc3c9c501ef6aa942 100644 (file)
@@ -481,7 +481,7 @@ rpcauth_wrap_req(struct rpc_task *task, kxdrproc_t encode, void *rqstp,
        if (cred->cr_ops->crwrap_req)
                return cred->cr_ops->crwrap_req(task, encode, rqstp, data, obj);
        /* By default, we encode the arguments normally. */
-       return encode(rqstp, data, obj);
+       return rpc_call_xdrproc(encode, rqstp, data, obj);
 }
 
 int
@@ -496,7 +496,7 @@ rpcauth_unwrap_resp(struct rpc_task *task, kxdrproc_t decode, void *rqstp,
                return cred->cr_ops->crunwrap_resp(task, decode, rqstp,
                                                   data, obj);
        /* By default, we decode the arguments normally. */
-       return decode(rqstp, data, obj);
+       return rpc_call_xdrproc(decode, rqstp, data, obj);
 }
 
 int
@@ -534,17 +534,18 @@ rpcauth_uptodatecred(struct rpc_task *task)
                test_bit(RPCAUTH_CRED_UPTODATE, &cred->cr_flags) != 0;
 }
 
-
-static struct shrinker *rpc_cred_shrinker;
+static struct shrinker rpc_cred_shrinker = {
+       .shrink = rpcauth_cache_shrinker,
+       .seeks = DEFAULT_SEEKS,
+};
 
 void __init rpcauth_init_module(void)
 {
        rpc_init_authunix();
-       rpc_cred_shrinker = set_shrinker(DEFAULT_SEEKS, rpcauth_cache_shrinker);
+       register_shrinker(&rpc_cred_shrinker);
 }
 
 void __exit rpcauth_remove_module(void)
 {
-       if (rpc_cred_shrinker != NULL)
-               remove_shrinker(rpc_cred_shrinker);
+       unregister_shrinker(&rpc_cred_shrinker);
 }