sunrpc_syms.c 1.6 KB

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