aboutsummaryrefslogtreecommitdiffstats
path: root/net/sunrpc/auth.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/sunrpc/auth.c')
-rw-r--r--net/sunrpc/auth.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/net/sunrpc/auth.c b/net/sunrpc/auth.c
index aa55d0a03e6f..29a8ecc60928 100644
--- a/net/sunrpc/auth.c
+++ b/net/sunrpc/auth.c
@@ -543,17 +543,18 @@ rpcauth_uptodatecred(struct rpc_task *task)
543 test_bit(RPCAUTH_CRED_UPTODATE, &cred->cr_flags) != 0; 543 test_bit(RPCAUTH_CRED_UPTODATE, &cred->cr_flags) != 0;
544} 544}
545 545
546 546static struct shrinker rpc_cred_shrinker = {
547static struct shrinker *rpc_cred_shrinker; 547 .shrink = rpcauth_cache_shrinker,
548 .seeks = DEFAULT_SEEKS,
549};
548 550
549void __init rpcauth_init_module(void) 551void __init rpcauth_init_module(void)
550{ 552{
551 rpc_init_authunix(); 553 rpc_init_authunix();
552 rpc_cred_shrinker = set_shrinker(DEFAULT_SEEKS, rpcauth_cache_shrinker); 554 register_shrinker(&rpc_cred_shrinker);
553} 555}
554 556
555void __exit rpcauth_remove_module(void) 557void __exit rpcauth_remove_module(void)
556{ 558{
557 if (rpc_cred_shrinker != NULL) 559 unregister_shrinker(&rpc_cred_shrinker);
558 remove_shrinker(rpc_cred_shrinker);
559} 560}