Merge branch 'for-2.6.36' of git://linux-nfs.org/~bfields/linux
[firefly-linux-kernel-4.4.55.git] / net / sunrpc / sunrpc_syms.c
index f438347d817b2bb5889ea6d364db5abeceb819e9..c0d085013a2be26f7bf3f34e195cebfc0a716039 100644 (file)
@@ -33,21 +33,27 @@ init_sunrpc(void)
        if (err)
                goto out;
        err = rpc_init_mempool();
-       if (err) {
-               unregister_rpc_pipefs();
-               goto out;
-       }
+       if (err)
+               goto out2;
+       err = rpcauth_init_module();
+       if (err)
+               goto out3;
 #ifdef RPC_DEBUG
        rpc_register_sysctl();
 #endif
 #ifdef CONFIG_PROC_FS
        rpc_proc_init();
 #endif
+       cache_initialize();
        cache_register(&ip_map_cache);
        cache_register(&unix_gid_cache);
        svc_init_xprt_sock();   /* svc sock transport */
        init_socket_xprt();     /* clnt sock transport */
-       rpcauth_init_module();
+       return 0;
+out3:
+       rpc_destroy_mempool();
+out2:
+       unregister_rpc_pipefs();
 out:
        return err;
 }