Skip to content

Commit

Permalink
SUNRPC: Move exported symbol definitions after function declaration p…
Browse files Browse the repository at this point in the history
…art 2

Do it for the server code...

Signed-off-by: Trond Myklebust <[email protected]>
Signed-off-by: J. Bruce Fields <[email protected]>
  • Loading branch information
Trond Myklebust authored and J. Bruce Fields committed Feb 1, 2008
1 parent d801b86 commit d2f7e79
Show file tree
Hide file tree
Showing 7 changed files with 33 additions and 42 deletions.
9 changes: 8 additions & 1 deletion net/sunrpc/cache.c
Original file line number Diff line number Diff line change
Expand Up @@ -245,6 +245,7 @@ int cache_check(struct cache_detail *detail,
cache_put(h, detail);
return rv;
}
EXPORT_SYMBOL(cache_check);

/*
* caches need to be periodically cleaned.
Expand Down Expand Up @@ -377,6 +378,7 @@ int cache_register(struct cache_detail *cd)
schedule_delayed_work(&cache_cleaner, 0);
return 0;
}
EXPORT_SYMBOL(cache_register);

void cache_unregister(struct cache_detail *cd)
{
Expand All @@ -402,6 +404,7 @@ void cache_unregister(struct cache_detail *cd)
out:
printk(KERN_ERR "nfsd: failed to unregister %s cache\n", cd->name);
}
EXPORT_SYMBOL(cache_unregister);

/* clean cache tries to find something to clean
* and cleans it.
Expand Down Expand Up @@ -516,6 +519,7 @@ void cache_flush(void)
while (cache_clean() != -1)
cond_resched();
}
EXPORT_SYMBOL(cache_flush);

void cache_purge(struct cache_detail *detail)
{
Expand All @@ -524,7 +528,7 @@ void cache_purge(struct cache_detail *detail)
cache_flush();
detail->flush_time = 1;
}

EXPORT_SYMBOL(cache_purge);


/*
Expand Down Expand Up @@ -990,6 +994,7 @@ void qword_add(char **bpp, int *lp, char *str)
*bpp = bp;
*lp = len;
}
EXPORT_SYMBOL(qword_add);

void qword_addhex(char **bpp, int *lp, char *buf, int blen)
{
Expand Down Expand Up @@ -1018,6 +1023,7 @@ void qword_addhex(char **bpp, int *lp, char *buf, int blen)
*bpp = bp;
*lp = len;
}
EXPORT_SYMBOL(qword_addhex);

static void warn_no_listener(struct cache_detail *detail)
{
Expand Down Expand Up @@ -1140,6 +1146,7 @@ int qword_get(char **bpp, char *dest, int bufsize)
*dest = '\0';
return len;
}
EXPORT_SYMBOL(qword_get);


/*
Expand Down
3 changes: 3 additions & 0 deletions net/sunrpc/stats.c
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,7 @@ void svc_seq_show(struct seq_file *seq, const struct svc_stat *statp) {
seq_putc(seq, '\n');
}
}
EXPORT_SYMBOL(svc_seq_show);

/**
* rpc_alloc_iostats - allocate an rpc_iostats structure
Expand Down Expand Up @@ -255,12 +256,14 @@ svc_proc_register(struct svc_stat *statp, const struct file_operations *fops)
{
return do_register(statp->program->pg_name, statp, fops);
}
EXPORT_SYMBOL(svc_proc_register);

void
svc_proc_unregister(const char *name)
{
remove_proc_entry(name, proc_net_rpc);
}
EXPORT_SYMBOL(svc_proc_unregister);

void
rpc_proc_init(void)
Expand Down
41 changes: 0 additions & 41 deletions net/sunrpc/sunrpc_syms.c
Original file line number Diff line number Diff line change
Expand Up @@ -22,47 +22,6 @@
#include <linux/sunrpc/rpc_pipe_fs.h>
#include <linux/sunrpc/xprtsock.h>

/* RPC server stuff */
EXPORT_SYMBOL(svc_create);
EXPORT_SYMBOL(svc_create_thread);
EXPORT_SYMBOL(svc_create_pooled);
EXPORT_SYMBOL(svc_set_num_threads);
EXPORT_SYMBOL(svc_exit_thread);
EXPORT_SYMBOL(svc_destroy);
EXPORT_SYMBOL(svc_drop);
EXPORT_SYMBOL(svc_process);
EXPORT_SYMBOL(svc_recv);
EXPORT_SYMBOL(svc_wake_up);
EXPORT_SYMBOL(svc_reserve);
EXPORT_SYMBOL(svc_auth_register);
EXPORT_SYMBOL(auth_domain_lookup);
EXPORT_SYMBOL(svc_authenticate);
EXPORT_SYMBOL(svc_set_client);

/* RPC statistics */
#ifdef CONFIG_PROC_FS
EXPORT_SYMBOL(svc_proc_register);
EXPORT_SYMBOL(svc_proc_unregister);
EXPORT_SYMBOL(svc_seq_show);
#endif

/* caching... */
EXPORT_SYMBOL(auth_domain_find);
EXPORT_SYMBOL(auth_domain_put);
EXPORT_SYMBOL(auth_unix_add_addr);
EXPORT_SYMBOL(auth_unix_forget_old);
EXPORT_SYMBOL(auth_unix_lookup);
EXPORT_SYMBOL(cache_check);
EXPORT_SYMBOL(cache_flush);
EXPORT_SYMBOL(cache_purge);
EXPORT_SYMBOL(cache_register);
EXPORT_SYMBOL(cache_unregister);
EXPORT_SYMBOL(qword_add);
EXPORT_SYMBOL(qword_addhex);
EXPORT_SYMBOL(qword_get);
EXPORT_SYMBOL(svcauth_unix_purge);
EXPORT_SYMBOL(unix_domain_find);

extern struct cache_detail ip_map_cache, unix_gid_cache;

static int __init
Expand Down
7 changes: 7 additions & 0 deletions net/sunrpc/svc.c
Original file line number Diff line number Diff line change
Expand Up @@ -433,6 +433,7 @@ svc_create(struct svc_program *prog, unsigned int bufsize,
{
return __svc_create(prog, bufsize, /*npools*/1, shutdown);
}
EXPORT_SYMBOL(svc_create);

struct svc_serv *
svc_create_pooled(struct svc_program *prog, unsigned int bufsize,
Expand All @@ -452,6 +453,7 @@ svc_create_pooled(struct svc_program *prog, unsigned int bufsize,

return serv;
}
EXPORT_SYMBOL(svc_create_pooled);

/*
* Destroy an RPC service. Should be called with the BKL held
Expand Down Expand Up @@ -493,6 +495,7 @@ svc_destroy(struct svc_serv *serv)
kfree(serv->sv_pools);
kfree(serv);
}
EXPORT_SYMBOL(svc_destroy);

/*
* Allocate an RPC server's buffer space.
Expand Down Expand Up @@ -617,6 +620,7 @@ svc_create_thread(svc_thread_fn func, struct svc_serv *serv)
{
return __svc_create_thread(func, serv, &serv->sv_pools[0]);
}
EXPORT_SYMBOL(svc_create_thread);

/*
* Choose a pool in which to create a new thread, for svc_set_num_threads
Expand Down Expand Up @@ -720,6 +724,7 @@ svc_set_num_threads(struct svc_serv *serv, struct svc_pool *pool, int nrservs)

return error;
}
EXPORT_SYMBOL(svc_set_num_threads);

/*
* Called from a server thread as it's exiting. Caller must hold BKL.
Expand All @@ -746,6 +751,7 @@ svc_exit_thread(struct svc_rqst *rqstp)
if (serv)
svc_destroy(serv);
}
EXPORT_SYMBOL(svc_exit_thread);

/*
* Register an RPC service with the local portmapper.
Expand Down Expand Up @@ -1069,6 +1075,7 @@ svc_process(struct svc_rqst *rqstp)
svc_putnl(resv, ntohl(rpc_stat));
goto sendit;
}
EXPORT_SYMBOL(svc_process);

/*
* Return (transport-specific) limit on the rpc payload.
Expand Down
4 changes: 4 additions & 0 deletions net/sunrpc/svc_xprt.c
Original file line number Diff line number Diff line change
Expand Up @@ -435,6 +435,7 @@ void svc_reserve(struct svc_rqst *rqstp, int space)
svc_xprt_enqueue(xprt);
}
}
EXPORT_SYMBOL(svc_reserve);

static void svc_xprt_release(struct svc_rqst *rqstp)
{
Expand Down Expand Up @@ -492,6 +493,7 @@ void svc_wake_up(struct svc_serv *serv)
spin_unlock_bh(&pool->sp_lock);
}
}
EXPORT_SYMBOL(svc_wake_up);

int svc_port_is_privileged(struct sockaddr *sin)
{
Expand Down Expand Up @@ -702,6 +704,7 @@ int svc_recv(struct svc_rqst *rqstp, long timeout)
serv->sv_stats->netcnt++;
return len;
}
EXPORT_SYMBOL(svc_recv);

/*
* Drop request
Expand All @@ -711,6 +714,7 @@ void svc_drop(struct svc_rqst *rqstp)
dprintk("svc: xprt %p dropped request\n", rqstp->rq_xprt);
svc_xprt_release(rqstp);
}
EXPORT_SYMBOL(svc_drop);

/*
* Return reply to client.
Expand Down
6 changes: 6 additions & 0 deletions net/sunrpc/svcauth.c
Original file line number Diff line number Diff line change
Expand Up @@ -57,11 +57,13 @@ svc_authenticate(struct svc_rqst *rqstp, __be32 *authp)
rqstp->rq_authop = aops;
return aops->accept(rqstp, authp);
}
EXPORT_SYMBOL(svc_authenticate);

int svc_set_client(struct svc_rqst *rqstp)
{
return rqstp->rq_authop->set_client(rqstp);
}
EXPORT_SYMBOL(svc_set_client);

/* A request, which was authenticated, has now executed.
* Time to finalise the credentials and verifier
Expand Down Expand Up @@ -93,6 +95,7 @@ svc_auth_register(rpc_authflavor_t flavor, struct auth_ops *aops)
spin_unlock(&authtab_lock);
return rv;
}
EXPORT_SYMBOL(svc_auth_register);

void
svc_auth_unregister(rpc_authflavor_t flavor)
Expand Down Expand Up @@ -129,6 +132,7 @@ void auth_domain_put(struct auth_domain *dom)
spin_unlock(&auth_domain_lock);
}
}
EXPORT_SYMBOL(auth_domain_put);

struct auth_domain *
auth_domain_lookup(char *name, struct auth_domain *new)
Expand All @@ -153,8 +157,10 @@ auth_domain_lookup(char *name, struct auth_domain *new)
spin_unlock(&auth_domain_lock);
return new;
}
EXPORT_SYMBOL(auth_domain_lookup);

struct auth_domain *auth_domain_find(char *name)
{
return auth_domain_lookup(name, NULL);
}
EXPORT_SYMBOL(auth_domain_find);
5 changes: 5 additions & 0 deletions net/sunrpc/svcauth_unix.c
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ struct auth_domain *unix_domain_find(char *name)
rv = auth_domain_lookup(name, &new->h);
}
}
EXPORT_SYMBOL(unix_domain_find);

static void svcauth_unix_domain_release(struct auth_domain *dom)
{
Expand Down Expand Up @@ -340,6 +341,7 @@ int auth_unix_add_addr(struct in_addr addr, struct auth_domain *dom)
else
return -ENOMEM;
}
EXPORT_SYMBOL(auth_unix_add_addr);

int auth_unix_forget_old(struct auth_domain *dom)
{
Expand All @@ -351,6 +353,7 @@ int auth_unix_forget_old(struct auth_domain *dom)
udom->addr_changes++;
return 0;
}
EXPORT_SYMBOL(auth_unix_forget_old);

struct auth_domain *auth_unix_lookup(struct in_addr addr)
{
Expand All @@ -375,11 +378,13 @@ struct auth_domain *auth_unix_lookup(struct in_addr addr)
cache_put(&ipm->h, &ip_map_cache);
return rv;
}
EXPORT_SYMBOL(auth_unix_lookup);

void svcauth_unix_purge(void)
{
cache_purge(&ip_map_cache);
}
EXPORT_SYMBOL(svcauth_unix_purge);

static inline struct ip_map *
ip_map_cached_get(struct svc_rqst *rqstp)
Expand Down

0 comments on commit d2f7e79

Please sign in to comment.