]> err.no Git - linux-2.6/blobdiff - net/sunrpc/sunrpc_syms.c
SUNRPC: Clean up rpc_pipefs.
[linux-2.6] / net / sunrpc / sunrpc_syms.c
index d85fddeb6388f54e4293b85e1e64da965c2ebd76..b99b11b11461fcffe8b3cad99d0ee20da9108b0e 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>
@@ -29,15 +28,11 @@ EXPORT_SYMBOL(rpc_init_task);
 EXPORT_SYMBOL(rpc_sleep_on);
 EXPORT_SYMBOL(rpc_wake_up_next);
 EXPORT_SYMBOL(rpc_wake_up_task);
-EXPORT_SYMBOL(rpciod_down);
-EXPORT_SYMBOL(rpciod_up);
-EXPORT_SYMBOL(rpc_new_task);
 EXPORT_SYMBOL(rpc_wake_up_status);
 
 /* RPC client functions */
 EXPORT_SYMBOL(rpc_clone_client);
 EXPORT_SYMBOL(rpc_bind_new_program);
-EXPORT_SYMBOL(rpc_destroy_client);
 EXPORT_SYMBOL(rpc_shutdown_client);
 EXPORT_SYMBOL(rpc_killall_tasks);
 EXPORT_SYMBOL(rpc_call_sync);
@@ -135,11 +130,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 +138,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 +150,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 +164,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