sunrpc_syms.c 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  1. /*
  2. * linux/net/sunrpc/sunrpc_syms.c
  3. *
  4. * Symbols exported by the sunrpc module.
  5. *
  6. * Copyright (C) 1997 Olaf Kirch <okir@monad.swb.de>
  7. */
  8. #include <linux/module.h>
  9. #include <linux/types.h>
  10. #include <linux/uio.h>
  11. #include <linux/unistd.h>
  12. #include <linux/init.h>
  13. #include <linux/sunrpc/sched.h>
  14. #include <linux/sunrpc/clnt.h>
  15. #include <linux/sunrpc/svc.h>
  16. #include <linux/sunrpc/svcsock.h>
  17. #include <linux/sunrpc/auth.h>
  18. #include <linux/workqueue.h>
  19. #include <linux/sunrpc/rpc_pipe_fs.h>
  20. #include <linux/sunrpc/xprtsock.h>
  21. extern struct cache_detail ip_map_cache, unix_gid_cache;
  22. extern void cleanup_rpcb_clnt(void);
  23. static int __init
  24. init_sunrpc(void)
  25. {
  26. int err = register_rpc_pipefs();
  27. if (err)
  28. goto out;
  29. err = rpc_init_mempool();
  30. if (err)
  31. goto out2;
  32. err = rpcauth_init_module();
  33. if (err)
  34. goto out3;
  35. #ifdef RPC_DEBUG
  36. rpc_register_sysctl();
  37. #endif
  38. #ifdef CONFIG_PROC_FS
  39. rpc_proc_init();
  40. #endif
  41. cache_initialize();
  42. cache_register(&ip_map_cache);
  43. cache_register(&unix_gid_cache);
  44. svc_init_xprt_sock(); /* svc sock transport */
  45. init_socket_xprt(); /* clnt sock transport */
  46. return 0;
  47. out3:
  48. rpc_destroy_mempool();
  49. out2:
  50. unregister_rpc_pipefs();
  51. out:
  52. return err;
  53. }
  54. static void __exit
  55. cleanup_sunrpc(void)
  56. {
  57. cleanup_rpcb_clnt();
  58. rpcauth_remove_module();
  59. cleanup_socket_xprt();
  60. svc_cleanup_xprt_sock();
  61. unregister_rpc_pipefs();
  62. rpc_destroy_mempool();
  63. cache_unregister(&ip_map_cache);
  64. cache_unregister(&unix_gid_cache);
  65. #ifdef RPC_DEBUG
  66. rpc_unregister_sysctl();
  67. #endif
  68. #ifdef CONFIG_PROC_FS
  69. rpc_proc_exit();
  70. #endif
  71. rcu_barrier(); /* Wait for completion of call_rcu()'s */
  72. }
  73. MODULE_LICENSE("GPL");
  74. fs_initcall(init_sunrpc); /* Ensure we're initialised before nfs */
  75. module_exit(cleanup_sunrpc);