Commit d2f7e79e3bad31b3d52c405085b9e01e5f6c01e0

Authored by Trond Myklebust
Committed by J. Bruce Fields
1 parent d801b86168

SUNRPC: Move exported symbol definitions after function declaration part 2

Do it for the server code...

Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>

Showing 7 changed files with 33 additions and 42 deletions Side-by-side Diff

... ... @@ -245,6 +245,7 @@
245 245 cache_put(h, detail);
246 246 return rv;
247 247 }
  248 +EXPORT_SYMBOL(cache_check);
248 249  
249 250 /*
250 251 * caches need to be periodically cleaned.
... ... @@ -377,6 +378,7 @@
377 378 schedule_delayed_work(&cache_cleaner, 0);
378 379 return 0;
379 380 }
  381 +EXPORT_SYMBOL(cache_register);
380 382  
381 383 void cache_unregister(struct cache_detail *cd)
382 384 {
... ... @@ -402,6 +404,7 @@
402 404 out:
403 405 printk(KERN_ERR "nfsd: failed to unregister %s cache\n", cd->name);
404 406 }
  407 +EXPORT_SYMBOL(cache_unregister);
405 408  
406 409 /* clean cache tries to find something to clean
407 410 * and cleans it.
... ... @@ -516,6 +519,7 @@
516 519 while (cache_clean() != -1)
517 520 cond_resched();
518 521 }
  522 +EXPORT_SYMBOL(cache_flush);
519 523  
520 524 void cache_purge(struct cache_detail *detail)
521 525 {
522 526  
... ... @@ -524,9 +528,9 @@
524 528 cache_flush();
525 529 detail->flush_time = 1;
526 530 }
  531 +EXPORT_SYMBOL(cache_purge);
527 532  
528 533  
529   -
530 534 /*
531 535 * Deferral and Revisiting of Requests.
532 536 *
... ... @@ -990,6 +994,7 @@
990 994 *bpp = bp;
991 995 *lp = len;
992 996 }
  997 +EXPORT_SYMBOL(qword_add);
993 998  
994 999 void qword_addhex(char **bpp, int *lp, char *buf, int blen)
995 1000 {
... ... @@ -1018,6 +1023,7 @@
1018 1023 *bpp = bp;
1019 1024 *lp = len;
1020 1025 }
  1026 +EXPORT_SYMBOL(qword_addhex);
1021 1027  
1022 1028 static void warn_no_listener(struct cache_detail *detail)
1023 1029 {
... ... @@ -1140,6 +1146,7 @@
1140 1146 *dest = '\0';
1141 1147 return len;
1142 1148 }
  1149 +EXPORT_SYMBOL(qword_get);
1143 1150  
1144 1151  
1145 1152 /*
... ... @@ -106,6 +106,7 @@
106 106 seq_putc(seq, '\n');
107 107 }
108 108 }
  109 +EXPORT_SYMBOL(svc_seq_show);
109 110  
110 111 /**
111 112 * rpc_alloc_iostats - allocate an rpc_iostats structure
112 113  
... ... @@ -255,12 +256,14 @@
255 256 {
256 257 return do_register(statp->program->pg_name, statp, fops);
257 258 }
  259 +EXPORT_SYMBOL(svc_proc_register);
258 260  
259 261 void
260 262 svc_proc_unregister(const char *name)
261 263 {
262 264 remove_proc_entry(name, proc_net_rpc);
263 265 }
  266 +EXPORT_SYMBOL(svc_proc_unregister);
264 267  
265 268 void
266 269 rpc_proc_init(void)
net/sunrpc/sunrpc_syms.c
... ... @@ -22,47 +22,6 @@
22 22 #include <linux/sunrpc/rpc_pipe_fs.h>
23 23 #include <linux/sunrpc/xprtsock.h>
24 24  
25   -/* RPC server stuff */
26   -EXPORT_SYMBOL(svc_create);
27   -EXPORT_SYMBOL(svc_create_thread);
28   -EXPORT_SYMBOL(svc_create_pooled);
29   -EXPORT_SYMBOL(svc_set_num_threads);
30   -EXPORT_SYMBOL(svc_exit_thread);
31   -EXPORT_SYMBOL(svc_destroy);
32   -EXPORT_SYMBOL(svc_drop);
33   -EXPORT_SYMBOL(svc_process);
34   -EXPORT_SYMBOL(svc_recv);
35   -EXPORT_SYMBOL(svc_wake_up);
36   -EXPORT_SYMBOL(svc_reserve);
37   -EXPORT_SYMBOL(svc_auth_register);
38   -EXPORT_SYMBOL(auth_domain_lookup);
39   -EXPORT_SYMBOL(svc_authenticate);
40   -EXPORT_SYMBOL(svc_set_client);
41   -
42   -/* RPC statistics */
43   -#ifdef CONFIG_PROC_FS
44   -EXPORT_SYMBOL(svc_proc_register);
45   -EXPORT_SYMBOL(svc_proc_unregister);
46   -EXPORT_SYMBOL(svc_seq_show);
47   -#endif
48   -
49   -/* caching... */
50   -EXPORT_SYMBOL(auth_domain_find);
51   -EXPORT_SYMBOL(auth_domain_put);
52   -EXPORT_SYMBOL(auth_unix_add_addr);
53   -EXPORT_SYMBOL(auth_unix_forget_old);
54   -EXPORT_SYMBOL(auth_unix_lookup);
55   -EXPORT_SYMBOL(cache_check);
56   -EXPORT_SYMBOL(cache_flush);
57   -EXPORT_SYMBOL(cache_purge);
58   -EXPORT_SYMBOL(cache_register);
59   -EXPORT_SYMBOL(cache_unregister);
60   -EXPORT_SYMBOL(qword_add);
61   -EXPORT_SYMBOL(qword_addhex);
62   -EXPORT_SYMBOL(qword_get);
63   -EXPORT_SYMBOL(svcauth_unix_purge);
64   -EXPORT_SYMBOL(unix_domain_find);
65   -
66 25 extern struct cache_detail ip_map_cache, unix_gid_cache;
67 26  
68 27 static int __init
... ... @@ -433,6 +433,7 @@
433 433 {
434 434 return __svc_create(prog, bufsize, /*npools*/1, shutdown);
435 435 }
  436 +EXPORT_SYMBOL(svc_create);
436 437  
437 438 struct svc_serv *
438 439 svc_create_pooled(struct svc_program *prog, unsigned int bufsize,
... ... @@ -452,6 +453,7 @@
452 453  
453 454 return serv;
454 455 }
  456 +EXPORT_SYMBOL(svc_create_pooled);
455 457  
456 458 /*
457 459 * Destroy an RPC service. Should be called with the BKL held
... ... @@ -493,6 +495,7 @@
493 495 kfree(serv->sv_pools);
494 496 kfree(serv);
495 497 }
  498 +EXPORT_SYMBOL(svc_destroy);
496 499  
497 500 /*
498 501 * Allocate an RPC server's buffer space.
... ... @@ -617,6 +620,7 @@
617 620 {
618 621 return __svc_create_thread(func, serv, &serv->sv_pools[0]);
619 622 }
  623 +EXPORT_SYMBOL(svc_create_thread);
620 624  
621 625 /*
622 626 * Choose a pool in which to create a new thread, for svc_set_num_threads
... ... @@ -720,6 +724,7 @@
720 724  
721 725 return error;
722 726 }
  727 +EXPORT_SYMBOL(svc_set_num_threads);
723 728  
724 729 /*
725 730 * Called from a server thread as it's exiting. Caller must hold BKL.
... ... @@ -746,6 +751,7 @@
746 751 if (serv)
747 752 svc_destroy(serv);
748 753 }
  754 +EXPORT_SYMBOL(svc_exit_thread);
749 755  
750 756 /*
751 757 * Register an RPC service with the local portmapper.
... ... @@ -1069,6 +1075,7 @@
1069 1075 svc_putnl(resv, ntohl(rpc_stat));
1070 1076 goto sendit;
1071 1077 }
  1078 +EXPORT_SYMBOL(svc_process);
1072 1079  
1073 1080 /*
1074 1081 * Return (transport-specific) limit on the rpc payload.
net/sunrpc/svc_xprt.c
... ... @@ -435,6 +435,7 @@
435 435 svc_xprt_enqueue(xprt);
436 436 }
437 437 }
  438 +EXPORT_SYMBOL(svc_reserve);
438 439  
439 440 static void svc_xprt_release(struct svc_rqst *rqstp)
440 441 {
... ... @@ -492,6 +493,7 @@
492 493 spin_unlock_bh(&pool->sp_lock);
493 494 }
494 495 }
  496 +EXPORT_SYMBOL(svc_wake_up);
495 497  
496 498 int svc_port_is_privileged(struct sockaddr *sin)
497 499 {
... ... @@ -702,6 +704,7 @@
702 704 serv->sv_stats->netcnt++;
703 705 return len;
704 706 }
  707 +EXPORT_SYMBOL(svc_recv);
705 708  
706 709 /*
707 710 * Drop request
... ... @@ -711,6 +714,7 @@
711 714 dprintk("svc: xprt %p dropped request\n", rqstp->rq_xprt);
712 715 svc_xprt_release(rqstp);
713 716 }
  717 +EXPORT_SYMBOL(svc_drop);
714 718  
715 719 /*
716 720 * Return reply to client.
net/sunrpc/svcauth.c
... ... @@ -57,11 +57,13 @@
57 57 rqstp->rq_authop = aops;
58 58 return aops->accept(rqstp, authp);
59 59 }
  60 +EXPORT_SYMBOL(svc_authenticate);
60 61  
61 62 int svc_set_client(struct svc_rqst *rqstp)
62 63 {
63 64 return rqstp->rq_authop->set_client(rqstp);
64 65 }
  66 +EXPORT_SYMBOL(svc_set_client);
65 67  
66 68 /* A request, which was authenticated, has now executed.
67 69 * Time to finalise the credentials and verifier
... ... @@ -93,6 +95,7 @@
93 95 spin_unlock(&authtab_lock);
94 96 return rv;
95 97 }
  98 +EXPORT_SYMBOL(svc_auth_register);
96 99  
97 100 void
98 101 svc_auth_unregister(rpc_authflavor_t flavor)
... ... @@ -129,6 +132,7 @@
129 132 spin_unlock(&auth_domain_lock);
130 133 }
131 134 }
  135 +EXPORT_SYMBOL(auth_domain_put);
132 136  
133 137 struct auth_domain *
134 138 auth_domain_lookup(char *name, struct auth_domain *new)
135 139  
... ... @@ -153,9 +157,11 @@
153 157 spin_unlock(&auth_domain_lock);
154 158 return new;
155 159 }
  160 +EXPORT_SYMBOL(auth_domain_lookup);
156 161  
157 162 struct auth_domain *auth_domain_find(char *name)
158 163 {
159 164 return auth_domain_lookup(name, NULL);
160 165 }
  166 +EXPORT_SYMBOL(auth_domain_find);
net/sunrpc/svcauth_unix.c
... ... @@ -63,6 +63,7 @@
63 63 rv = auth_domain_lookup(name, &new->h);
64 64 }
65 65 }
  66 +EXPORT_SYMBOL(unix_domain_find);
66 67  
67 68 static void svcauth_unix_domain_release(struct auth_domain *dom)
68 69 {
... ... @@ -340,6 +341,7 @@
340 341 else
341 342 return -ENOMEM;
342 343 }
  344 +EXPORT_SYMBOL(auth_unix_add_addr);
343 345  
344 346 int auth_unix_forget_old(struct auth_domain *dom)
345 347 {
... ... @@ -351,6 +353,7 @@
351 353 udom->addr_changes++;
352 354 return 0;
353 355 }
  356 +EXPORT_SYMBOL(auth_unix_forget_old);
354 357  
355 358 struct auth_domain *auth_unix_lookup(struct in_addr addr)
356 359 {
357 360  
... ... @@ -375,11 +378,13 @@
375 378 cache_put(&ipm->h, &ip_map_cache);
376 379 return rv;
377 380 }
  381 +EXPORT_SYMBOL(auth_unix_lookup);
378 382  
379 383 void svcauth_unix_purge(void)
380 384 {
381 385 cache_purge(&ip_map_cache);
382 386 }
  387 +EXPORT_SYMBOL(svcauth_unix_purge);
383 388  
384 389 static inline struct ip_map *
385 390 ip_map_cached_get(struct svc_rqst *rqstp)