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>

authored by Trond Myklebust and committed by J. Bruce Fields d2f7e79e d801b861

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