]> err.no Git - linux-2.6/blobdiff - net/sunrpc/sunrpc_syms.c
Merge git://git.linux-nfs.org/pub/linux/nfs-2.6
[linux-2.6] / net / sunrpc / sunrpc_syms.c
index d85fddeb6388f54e4293b85e1e64da965c2ebd76..73075dec83c07e4d73503156ca22668519cdfcf5 100644 (file)
@@ -9,7 +9,6 @@
 #include <linux/module.h>
 
 #include <linux/types.h>
-#include <linux/sched.h>
 #include <linux/uio.h>
 #include <linux/unistd.h>
 #include <linux/init.h>
@@ -135,11 +134,7 @@ EXPORT_SYMBOL(nfsd_debug);
 EXPORT_SYMBOL(nlm_debug);
 #endif
 
-extern int register_rpc_pipefs(void);
-extern void unregister_rpc_pipefs(void);
-extern struct cache_detail ip_map_cache;
-extern int init_socket_xprt(void);
-extern void cleanup_socket_xprt(void);
+extern struct cache_detail ip_map_cache, unix_gid_cache;
 
 static int __init
 init_sunrpc(void)
@@ -147,9 +142,11 @@ init_sunrpc(void)
        int err = register_rpc_pipefs();
        if (err)
                goto out;
-       err = rpc_init_mempool() != 0;
-       if (err)
+       err = rpc_init_mempool();
+       if (err) {
+               unregister_rpc_pipefs();
                goto out;
+       }
 #ifdef RPC_DEBUG
        rpc_register_sysctl();
 #endif
@@ -157,6 +154,7 @@ init_sunrpc(void)
        rpc_proc_init();
 #endif
        cache_register(&ip_map_cache);
+       cache_register(&unix_gid_cache);
        init_socket_xprt();
 out:
        return err;
@@ -170,6 +168,8 @@ cleanup_sunrpc(void)
        rpc_destroy_mempool();
        if (cache_unregister(&ip_map_cache))
                printk(KERN_ERR "sunrpc: failed to unregister ip_map cache\n");
+       if (cache_unregister(&unix_gid_cache))
+             printk(KERN_ERR "sunrpc: failed to unregister unix_gid cache\n");
 #ifdef RPC_DEBUG
        rpc_unregister_sysctl();
 #endif