[PATCH] RPC: Make rpc_create_client() destroy the transport on failure.
[linux-2.6] / net / sunrpc / sunrpc_syms.c
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
9 #include <linux/config.h>
10 #include <linux/module.h>
11
12 #include <linux/types.h>
13 #include <linux/socket.h>
14 #include <linux/sched.h>
15 #include <linux/uio.h>
16 #include <linux/unistd.h>
17 #include <linux/init.h>
18
19 #include <linux/sunrpc/sched.h>
20 #include <linux/sunrpc/clnt.h>
21 #include <linux/sunrpc/svc.h>
22 #include <linux/sunrpc/svcsock.h>
23 #include <linux/sunrpc/auth.h>
24 #include <linux/workqueue.h>
25 #include <linux/sunrpc/rpc_pipe_fs.h>
26
27
28 /* RPC scheduler */
29 EXPORT_SYMBOL(rpc_execute);
30 EXPORT_SYMBOL(rpc_init_task);
31 EXPORT_SYMBOL(rpc_sleep_on);
32 EXPORT_SYMBOL(rpc_wake_up_next);
33 EXPORT_SYMBOL(rpc_wake_up_task);
34 EXPORT_SYMBOL(rpc_new_child);
35 EXPORT_SYMBOL(rpc_run_child);
36 EXPORT_SYMBOL(rpciod_down);
37 EXPORT_SYMBOL(rpciod_up);
38 EXPORT_SYMBOL(rpc_new_task);
39 EXPORT_SYMBOL(rpc_wake_up_status);
40 EXPORT_SYMBOL(rpc_release_task);
41
42 /* RPC client functions */
43 EXPORT_SYMBOL(rpc_create_client);
44 EXPORT_SYMBOL(rpc_clone_client);
45 EXPORT_SYMBOL(rpc_destroy_client);
46 EXPORT_SYMBOL(rpc_shutdown_client);
47 EXPORT_SYMBOL(rpc_release_client);
48 EXPORT_SYMBOL(rpc_killall_tasks);
49 EXPORT_SYMBOL(rpc_call_sync);
50 EXPORT_SYMBOL(rpc_call_async);
51 EXPORT_SYMBOL(rpc_call_setup);
52 EXPORT_SYMBOL(rpc_clnt_sigmask);
53 EXPORT_SYMBOL(rpc_clnt_sigunmask);
54 EXPORT_SYMBOL(rpc_delay);
55 EXPORT_SYMBOL(rpc_restart_call);
56 EXPORT_SYMBOL(rpc_setbufsize);
57 EXPORT_SYMBOL(rpc_unlink);
58 EXPORT_SYMBOL(rpc_wake_up);
59 EXPORT_SYMBOL(rpc_queue_upcall);
60 EXPORT_SYMBOL(rpc_mkpipe);
61
62 /* Client transport */
63 EXPORT_SYMBOL(xprt_create_proto);
64 EXPORT_SYMBOL(xprt_set_timeout);
65 EXPORT_SYMBOL(xprt_udp_slot_table_entries);
66 EXPORT_SYMBOL(xprt_tcp_slot_table_entries);
67
68 /* Client credential cache */
69 EXPORT_SYMBOL(rpcauth_register);
70 EXPORT_SYMBOL(rpcauth_unregister);
71 EXPORT_SYMBOL(rpcauth_create);
72 EXPORT_SYMBOL(rpcauth_lookupcred);
73 EXPORT_SYMBOL(rpcauth_lookup_credcache);
74 EXPORT_SYMBOL(rpcauth_free_credcache);
75 EXPORT_SYMBOL(rpcauth_init_credcache);
76 EXPORT_SYMBOL(put_rpccred);
77
78 /* RPC server stuff */
79 EXPORT_SYMBOL(svc_create);
80 EXPORT_SYMBOL(svc_create_thread);
81 EXPORT_SYMBOL(svc_exit_thread);
82 EXPORT_SYMBOL(svc_destroy);
83 EXPORT_SYMBOL(svc_drop);
84 EXPORT_SYMBOL(svc_process);
85 EXPORT_SYMBOL(svc_recv);
86 EXPORT_SYMBOL(svc_wake_up);
87 EXPORT_SYMBOL(svc_makesock);
88 EXPORT_SYMBOL(svc_reserve);
89 EXPORT_SYMBOL(svc_auth_register);
90 EXPORT_SYMBOL(auth_domain_lookup);
91 EXPORT_SYMBOL(svc_authenticate);
92 EXPORT_SYMBOL(svc_set_client);
93
94 /* RPC statistics */
95 #ifdef CONFIG_PROC_FS
96 EXPORT_SYMBOL(rpc_proc_register);
97 EXPORT_SYMBOL(rpc_proc_unregister);
98 EXPORT_SYMBOL(svc_proc_register);
99 EXPORT_SYMBOL(svc_proc_unregister);
100 EXPORT_SYMBOL(svc_seq_show);
101 #endif
102
103 /* caching... */
104 EXPORT_SYMBOL(auth_domain_find);
105 EXPORT_SYMBOL(auth_domain_put);
106 EXPORT_SYMBOL(auth_unix_add_addr);
107 EXPORT_SYMBOL(auth_unix_forget_old);
108 EXPORT_SYMBOL(auth_unix_lookup);
109 EXPORT_SYMBOL(cache_check);
110 EXPORT_SYMBOL(cache_flush);
111 EXPORT_SYMBOL(cache_purge);
112 EXPORT_SYMBOL(cache_fresh);
113 EXPORT_SYMBOL(cache_init);
114 EXPORT_SYMBOL(cache_register);
115 EXPORT_SYMBOL(cache_unregister);
116 EXPORT_SYMBOL(qword_add);
117 EXPORT_SYMBOL(qword_addhex);
118 EXPORT_SYMBOL(qword_get);
119 EXPORT_SYMBOL(svcauth_unix_purge);
120 EXPORT_SYMBOL(unix_domain_find);
121
122 /* Generic XDR */
123 EXPORT_SYMBOL(xdr_encode_string);
124 EXPORT_SYMBOL(xdr_decode_string);
125 EXPORT_SYMBOL(xdr_decode_string_inplace);
126 EXPORT_SYMBOL(xdr_decode_netobj);
127 EXPORT_SYMBOL(xdr_encode_netobj);
128 EXPORT_SYMBOL(xdr_encode_pages);
129 EXPORT_SYMBOL(xdr_inline_pages);
130 EXPORT_SYMBOL(xdr_shift_buf);
131 EXPORT_SYMBOL(xdr_buf_from_iov);
132 EXPORT_SYMBOL(xdr_buf_subsegment);
133 EXPORT_SYMBOL(xdr_buf_read_netobj);
134 EXPORT_SYMBOL(read_bytes_from_xdr_buf);
135
136 /* Debugging symbols */
137 #ifdef RPC_DEBUG
138 EXPORT_SYMBOL(rpc_debug);
139 EXPORT_SYMBOL(nfs_debug);
140 EXPORT_SYMBOL(nfsd_debug);
141 EXPORT_SYMBOL(nlm_debug);
142 #endif
143
144 extern int register_rpc_pipefs(void);
145 extern void unregister_rpc_pipefs(void);
146
147 static int __init
148 init_sunrpc(void)
149 {
150         int err = register_rpc_pipefs();
151         if (err)
152                 goto out;
153         err = rpc_init_mempool() != 0;
154         if (err)
155                 goto out;
156 #ifdef RPC_DEBUG
157         rpc_register_sysctl();
158 #endif
159 #ifdef CONFIG_PROC_FS
160         rpc_proc_init();
161 #endif
162         cache_register(&auth_domain_cache);
163         cache_register(&ip_map_cache);
164 out:
165         return err;
166 }
167
168 static void __exit
169 cleanup_sunrpc(void)
170 {
171         unregister_rpc_pipefs();
172         rpc_destroy_mempool();
173         cache_unregister(&auth_domain_cache);
174         cache_unregister(&ip_map_cache);
175 #ifdef RPC_DEBUG
176         rpc_unregister_sysctl();
177 #endif
178 #ifdef CONFIG_PROC_FS
179         rpc_proc_exit();
180 #endif
181 }
182 MODULE_LICENSE("GPL");
183 module_init(init_sunrpc);
184 module_exit(cleanup_sunrpc);