diff options
Diffstat (limited to 'net/sunrpc/auth.c')
-rw-r--r-- | net/sunrpc/auth.c | 19 |
1 files changed, 16 insertions, 3 deletions
diff --git a/net/sunrpc/auth.c b/net/sunrpc/auth.c index 73affb8624fa..db135543d21e 100644 --- a/net/sunrpc/auth.c +++ b/net/sunrpc/auth.c | |||
@@ -587,14 +587,27 @@ static struct shrinker rpc_cred_shrinker = { | |||
587 | .seeks = DEFAULT_SEEKS, | 587 | .seeks = DEFAULT_SEEKS, |
588 | }; | 588 | }; |
589 | 589 | ||
590 | void __init rpcauth_init_module(void) | 590 | int __init rpcauth_init_module(void) |
591 | { | 591 | { |
592 | rpc_init_authunix(); | 592 | int err; |
593 | rpc_init_generic_auth(); | 593 | |
594 | err = rpc_init_authunix(); | ||
595 | if (err < 0) | ||
596 | goto out1; | ||
597 | err = rpc_init_generic_auth(); | ||
598 | if (err < 0) | ||
599 | goto out2; | ||
594 | register_shrinker(&rpc_cred_shrinker); | 600 | register_shrinker(&rpc_cred_shrinker); |
601 | return 0; | ||
602 | out2: | ||
603 | rpc_destroy_authunix(); | ||
604 | out1: | ||
605 | return err; | ||
595 | } | 606 | } |
596 | 607 | ||
597 | void __exit rpcauth_remove_module(void) | 608 | void __exit rpcauth_remove_module(void) |
598 | { | 609 | { |
610 | rpc_destroy_authunix(); | ||
611 | rpc_destroy_generic_auth(); | ||
599 | unregister_shrinker(&rpc_cred_shrinker); | 612 | unregister_shrinker(&rpc_cred_shrinker); |
600 | } | 613 | } |