sunrpc_syms.c 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  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. unregister_rpc_pipefs();
  32. goto out;
  33. }
  34. #ifdef RPC_DEBUG
  35. rpc_register_sysctl();
  36. #endif
  37. #ifdef CONFIG_PROC_FS
  38. rpc_proc_init();
  39. #endif
  40. cache_register(&ip_map_cache);
  41. cache_register(&unix_gid_cache);
  42. svc_init_xprt_sock(); /* svc sock transport */
  43. init_socket_xprt(); /* clnt sock transport */
  44. rpcauth_init_module();
  45. out:
  46. return err;
  47. }
  48. static void __exit
  49. cleanup_sunrpc(void)
  50. {
  51. cleanup_rpcb_clnt();
  52. rpcauth_remove_module();
  53. cleanup_socket_xprt();
  54. svc_cleanup_xprt_sock();
  55. unregister_rpc_pipefs();
  56. rpc_destroy_mempool();
  57. cache_unregister(&ip_map_cache);
  58. cache_unregister(&unix_gid_cache);
  59. #ifdef RPC_DEBUG
  60. rpc_unregister_sysctl();
  61. #endif
  62. #ifdef CONFIG_PROC_FS
  63. rpc_proc_exit();
  64. #endif
  65. rcu_barrier(); /* Wait for completion of call_rcu()'s */
  66. }
  67. MODULE_LICENSE("GPL");
  68. fs_initcall(init_sunrpc); /* Ensure we're initialised before nfs */
  69. module_exit(cleanup_sunrpc);