Skip to content

Commit a6eaf8b

Browse files
Trond MyklebustTrond Myklebust
authored andcommitted
SUNRPC: Move exported declarations to the function declarations
Do this for all RPC client related functions and XDR functions. Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
1 parent 93a44a7 commit a6eaf8b

9 files changed

Lines changed: 55 additions & 67 deletions

File tree

‎net/sunrpc/auth.c‎

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ rpcauth_register(const struct rpc_authops *ops)
5151
spin_unlock(&rpc_authflavor_lock);
5252
return ret;
5353
}
54+
EXPORT_SYMBOL(rpcauth_register);
5455

5556
int
5657
rpcauth_unregister(const struct rpc_authops *ops)
@@ -68,6 +69,7 @@ rpcauth_unregister(const struct rpc_authops *ops)
6869
spin_unlock(&rpc_authflavor_lock);
6970
return ret;
7071
}
72+
EXPORT_SYMBOL(rpcauth_unregister);
7173

7274
struct rpc_auth *
7375
rpcauth_create(rpc_authflavor_t pseudoflavor, struct rpc_clnt *clnt)
@@ -102,6 +104,7 @@ rpcauth_create(rpc_authflavor_t pseudoflavor, struct rpc_clnt *clnt)
102104
out:
103105
return auth;
104106
}
107+
EXPORT_SYMBOL(rpcauth_create);
105108

106109
void
107110
rpcauth_release(struct rpc_auth *auth)
@@ -151,6 +154,7 @@ rpcauth_init_credcache(struct rpc_auth *auth)
151154
auth->au_credcache = new;
152155
return 0;
153156
}
157+
EXPORT_SYMBOL(rpcauth_init_credcache);
154158

155159
/*
156160
* Destroy a list of credentials
@@ -213,6 +217,7 @@ rpcauth_destroy_credcache(struct rpc_auth *auth)
213217
kfree(cache);
214218
}
215219
}
220+
EXPORT_SYMBOL(rpcauth_destroy_credcache);
216221

217222
/*
218223
* Remove stale credentials. Avoid sleeping inside the loop.
@@ -332,6 +337,7 @@ rpcauth_lookup_credcache(struct rpc_auth *auth, struct auth_cred * acred,
332337
out:
333338
return cred;
334339
}
340+
EXPORT_SYMBOL(rpcauth_lookup_credcache);
335341

336342
struct rpc_cred *
337343
rpcauth_lookupcred(struct rpc_auth *auth, int flags)
@@ -350,6 +356,7 @@ rpcauth_lookupcred(struct rpc_auth *auth, int flags)
350356
put_group_info(acred.group_info);
351357
return ret;
352358
}
359+
EXPORT_SYMBOL(rpcauth_lookupcred);
353360

354361
void
355362
rpcauth_init_cred(struct rpc_cred *cred, const struct auth_cred *acred,
@@ -435,6 +442,7 @@ put_rpccred(struct rpc_cred *cred)
435442
out_destroy:
436443
cred->cr_ops->crdestroy(cred);
437444
}
445+
EXPORT_SYMBOL(put_rpccred);
438446

439447
void
440448
rpcauth_unbindcred(struct rpc_task *task)

‎net/sunrpc/clnt.c‎

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -345,6 +345,7 @@ rpc_clone_client(struct rpc_clnt *clnt)
345345
dprintk("RPC: %s: returned error %d\n", __FUNCTION__, err);
346346
return ERR_PTR(err);
347347
}
348+
EXPORT_SYMBOL(rpc_clone_client);
348349

349350
/*
350351
* Properly shut down an RPC client, terminating all outstanding
@@ -363,6 +364,7 @@ void rpc_shutdown_client(struct rpc_clnt *clnt)
363364

364365
rpc_release_client(clnt);
365366
}
367+
EXPORT_SYMBOL(rpc_shutdown_client);
366368

367369
/*
368370
* Free an RPC client
@@ -467,6 +469,7 @@ struct rpc_clnt *rpc_bind_new_program(struct rpc_clnt *old,
467469
out:
468470
return clnt;
469471
}
472+
EXPORT_SYMBOL(rpc_bind_new_program);
470473

471474
/*
472475
* Default callback for async RPC calls
@@ -512,11 +515,13 @@ void rpc_clnt_sigmask(struct rpc_clnt *clnt, sigset_t *oldset)
512515
{
513516
rpc_save_sigmask(oldset, clnt->cl_intr);
514517
}
518+
EXPORT_SYMBOL(rpc_clnt_sigmask);
515519

516520
void rpc_clnt_sigunmask(struct rpc_clnt *clnt, sigset_t *oldset)
517521
{
518522
rpc_restore_sigmask(oldset);
519523
}
524+
EXPORT_SYMBOL(rpc_clnt_sigunmask);
520525

521526
static
522527
struct rpc_task *rpc_do_run_task(struct rpc_clnt *clnt,
@@ -572,6 +577,7 @@ int rpc_call_sync(struct rpc_clnt *clnt, struct rpc_message *msg, int flags)
572577
rpc_put_task(task);
573578
return status;
574579
}
580+
EXPORT_SYMBOL(rpc_call_sync);
575581

576582
/**
577583
* rpc_call_async - Perform an asynchronous RPC call
@@ -593,6 +599,7 @@ rpc_call_async(struct rpc_clnt *clnt, struct rpc_message *msg, int flags,
593599
rpc_put_task(task);
594600
return 0;
595601
}
602+
EXPORT_SYMBOL(rpc_call_async);
596603

597604
/**
598605
* rpc_run_task - Allocate a new RPC task, then run rpc_execute against it
@@ -625,6 +632,7 @@ rpc_call_setup(struct rpc_task *task, struct rpc_message *msg, int flags)
625632
else
626633
task->tk_action = rpc_exit_task;
627634
}
635+
EXPORT_SYMBOL(rpc_call_setup);
628636

629637
/**
630638
* rpc_peeraddr - extract remote peer address from clnt's xprt
@@ -671,6 +679,7 @@ rpc_setbufsize(struct rpc_clnt *clnt, unsigned int sndsize, unsigned int rcvsize
671679
if (xprt->ops->set_buffer_size)
672680
xprt->ops->set_buffer_size(xprt, sndsize, rcvsize);
673681
}
682+
EXPORT_SYMBOL(rpc_setbufsize);
674683

675684
/*
676685
* Return size of largest payload RPC client can support, in bytes
@@ -710,6 +719,7 @@ rpc_restart_call(struct rpc_task *task)
710719

711720
task->tk_action = call_start;
712721
}
722+
EXPORT_SYMBOL(rpc_restart_call);
713723

714724
/*
715725
* 0. Initial state

‎net/sunrpc/rpc_pipe.c‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,7 @@ rpc_queue_upcall(struct inode *inode, struct rpc_pipe_msg *msg)
113113
wake_up(&rpci->waitq);
114114
return res;
115115
}
116+
EXPORT_SYMBOL(rpc_queue_upcall);
116117

117118
static inline void
118119
rpc_inode_setowner(struct inode *inode, void *private)
@@ -805,6 +806,7 @@ rpc_mkpipe(struct dentry *parent, const char *name, void *private, struct rpc_pi
805806
-ENOMEM);
806807
goto out;
807808
}
809+
EXPORT_SYMBOL(rpc_mkpipe);
808810

809811
/**
810812
* rpc_unlink - remove a pipe
@@ -835,6 +837,7 @@ rpc_unlink(struct dentry *dentry)
835837
dput(parent);
836838
return error;
837839
}
840+
EXPORT_SYMBOL(rpc_unlink);
838841

839842
/*
840843
* populate the filesystem

‎net/sunrpc/sched.c‎

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -373,6 +373,7 @@ void rpc_sleep_on(struct rpc_wait_queue *q, struct rpc_task *task,
373373
__rpc_sleep_on(q, task, action, timer);
374374
spin_unlock_bh(&q->lock);
375375
}
376+
EXPORT_SYMBOL(rpc_sleep_on);
376377

377378
/**
378379
* __rpc_do_wake_up_task - wake up a single rpc_task
@@ -444,6 +445,7 @@ void rpc_wake_up_task(struct rpc_task *task)
444445
}
445446
rcu_read_unlock_bh();
446447
}
448+
EXPORT_SYMBOL(rpc_wake_up_task);
447449

448450
/*
449451
* Wake up the next task on a priority queue.
@@ -519,6 +521,7 @@ struct rpc_task * rpc_wake_up_next(struct rpc_wait_queue *queue)
519521

520522
return task;
521523
}
524+
EXPORT_SYMBOL(rpc_wake_up_next);
522525

523526
/**
524527
* rpc_wake_up - wake up all rpc_tasks
@@ -544,6 +547,7 @@ void rpc_wake_up(struct rpc_wait_queue *queue)
544547
spin_unlock(&queue->lock);
545548
rcu_read_unlock_bh();
546549
}
550+
EXPORT_SYMBOL(rpc_wake_up);
547551

548552
/**
549553
* rpc_wake_up_status - wake up all rpc_tasks and set their status value.
@@ -572,6 +576,7 @@ void rpc_wake_up_status(struct rpc_wait_queue *queue, int status)
572576
spin_unlock(&queue->lock);
573577
rcu_read_unlock_bh();
574578
}
579+
EXPORT_SYMBOL(rpc_wake_up_status);
575580

576581
static void __rpc_atrun(struct rpc_task *task)
577582
{
@@ -586,6 +591,7 @@ void rpc_delay(struct rpc_task *task, unsigned long delay)
586591
task->tk_timeout = delay;
587592
rpc_sleep_on(&delay_queue, task, NULL, __rpc_atrun);
588593
}
594+
EXPORT_SYMBOL(rpc_delay);
589595

590596
/*
591597
* Helper to call task->tk_ops->rpc_call_prepare
@@ -731,6 +737,7 @@ void rpc_execute(struct rpc_task *task)
731737
rpc_set_running(task);
732738
__rpc_execute(task);
733739
}
740+
EXPORT_SYMBOL(rpc_execute);
734741

735742
static void rpc_async_schedule(struct work_struct *work)
736743
{
@@ -848,6 +855,7 @@ void rpc_init_task(struct rpc_task *task, struct rpc_clnt *clnt, int flags, cons
848855
dprintk("RPC: new task initialized, procpid %u\n",
849856
task_pid_nr(current));
850857
}
858+
EXPORT_SYMBOL(rpc_init_task);
851859

852860
static struct rpc_task *
853861
rpc_alloc_task(void)
@@ -959,6 +967,7 @@ void rpc_killall_tasks(struct rpc_clnt *clnt)
959967
}
960968
spin_unlock(&clnt->cl_lock);
961969
}
970+
EXPORT_SYMBOL(rpc_killall_tasks);
962971

963972
int rpciod_up(void)
964973
{

‎net/sunrpc/stats.c‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -241,12 +241,14 @@ rpc_proc_register(struct rpc_stat *statp)
241241
{
242242
return do_register(statp->program->name, statp, &rpc_proc_fops);
243243
}
244+
EXPORT_SYMBOL(rpc_proc_register);
244245

245246
void
246247
rpc_proc_unregister(const char *name)
247248
{
248249
remove_proc_entry(name, proc_net_rpc);
249250
}
251+
EXPORT_SYMBOL(rpc_proc_unregister);
250252

251253
struct proc_dir_entry *
252254
svc_proc_register(struct svc_stat *statp, const struct file_operations *fops)

‎net/sunrpc/sunrpc_syms.c‎

Lines changed: 0 additions & 66 deletions
Original file line numberDiff line numberDiff line change
@@ -22,45 +22,6 @@
2222
#include <linux/sunrpc/rpc_pipe_fs.h>
2323
#include <linux/sunrpc/xprtsock.h>
2424

25-
/* RPC scheduler */
26-
EXPORT_SYMBOL(rpc_execute);
27-
EXPORT_SYMBOL(rpc_init_task);
28-
EXPORT_SYMBOL(rpc_sleep_on);
29-
EXPORT_SYMBOL(rpc_wake_up_next);
30-
EXPORT_SYMBOL(rpc_wake_up_task);
31-
EXPORT_SYMBOL(rpc_wake_up_status);
32-
33-
/* RPC client functions */
34-
EXPORT_SYMBOL(rpc_clone_client);
35-
EXPORT_SYMBOL(rpc_bind_new_program);
36-
EXPORT_SYMBOL(rpc_shutdown_client);
37-
EXPORT_SYMBOL(rpc_killall_tasks);
38-
EXPORT_SYMBOL(rpc_call_sync);
39-
EXPORT_SYMBOL(rpc_call_async);
40-
EXPORT_SYMBOL(rpc_call_setup);
41-
EXPORT_SYMBOL(rpc_clnt_sigmask);
42-
EXPORT_SYMBOL(rpc_clnt_sigunmask);
43-
EXPORT_SYMBOL(rpc_delay);
44-
EXPORT_SYMBOL(rpc_restart_call);
45-
EXPORT_SYMBOL(rpc_setbufsize);
46-
EXPORT_SYMBOL(rpc_unlink);
47-
EXPORT_SYMBOL(rpc_wake_up);
48-
EXPORT_SYMBOL(rpc_queue_upcall);
49-
EXPORT_SYMBOL(rpc_mkpipe);
50-
51-
/* Client transport */
52-
EXPORT_SYMBOL(xprt_set_timeout);
53-
54-
/* Client credential cache */
55-
EXPORT_SYMBOL(rpcauth_register);
56-
EXPORT_SYMBOL(rpcauth_unregister);
57-
EXPORT_SYMBOL(rpcauth_create);
58-
EXPORT_SYMBOL(rpcauth_lookupcred);
59-
EXPORT_SYMBOL(rpcauth_lookup_credcache);
60-
EXPORT_SYMBOL(rpcauth_destroy_credcache);
61-
EXPORT_SYMBOL(rpcauth_init_credcache);
62-
EXPORT_SYMBOL(put_rpccred);
63-
6425
/* RPC server stuff */
6526
EXPORT_SYMBOL(svc_create);
6627
EXPORT_SYMBOL(svc_create_thread);
@@ -81,8 +42,6 @@ EXPORT_SYMBOL(svc_set_client);
8142

8243
/* RPC statistics */
8344
#ifdef CONFIG_PROC_FS
84-
EXPORT_SYMBOL(rpc_proc_register);
85-
EXPORT_SYMBOL(rpc_proc_unregister);
8645
EXPORT_SYMBOL(svc_proc_register);
8746
EXPORT_SYMBOL(svc_proc_unregister);
8847
EXPORT_SYMBOL(svc_seq_show);
@@ -105,31 +64,6 @@ EXPORT_SYMBOL(qword_get);
10564
EXPORT_SYMBOL(svcauth_unix_purge);
10665
EXPORT_SYMBOL(unix_domain_find);
10766

108-
/* Generic XDR */
109-
EXPORT_SYMBOL(xdr_encode_string);
110-
EXPORT_SYMBOL(xdr_decode_string_inplace);
111-
EXPORT_SYMBOL(xdr_decode_netobj);
112-
EXPORT_SYMBOL(xdr_encode_netobj);
113-
EXPORT_SYMBOL(xdr_encode_pages);
114-
EXPORT_SYMBOL(xdr_inline_pages);
115-
EXPORT_SYMBOL(xdr_shift_buf);
116-
EXPORT_SYMBOL(xdr_encode_word);
117-
EXPORT_SYMBOL(xdr_decode_word);
118-
EXPORT_SYMBOL(xdr_encode_array2);
119-
EXPORT_SYMBOL(xdr_decode_array2);
120-
EXPORT_SYMBOL(xdr_buf_from_iov);
121-
EXPORT_SYMBOL(xdr_buf_subsegment);
122-
EXPORT_SYMBOL(xdr_buf_read_netobj);
123-
EXPORT_SYMBOL(read_bytes_from_xdr_buf);
124-
125-
/* Debugging symbols */
126-
#ifdef RPC_DEBUG
127-
EXPORT_SYMBOL(rpc_debug);
128-
EXPORT_SYMBOL(nfs_debug);
129-
EXPORT_SYMBOL(nfsd_debug);
130-
EXPORT_SYMBOL(nlm_debug);
131-
#endif
132-
13367
extern struct cache_detail ip_map_cache, unix_gid_cache;
13468

13569
static int __init

‎net/sunrpc/sysctl.c‎

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,16 @@
2323
* Declare the debug flags here
2424
*/
2525
unsigned int rpc_debug;
26+
EXPORT_SYMBOL(rpc_debug);
27+
2628
unsigned int nfs_debug;
29+
EXPORT_SYMBOL(nfs_debug);
30+
2731
unsigned int nfsd_debug;
32+
EXPORT_SYMBOL(nfsd_debug);
33+
2834
unsigned int nlm_debug;
35+
EXPORT_SYMBOL(nlm_debug);
2936

3037
#ifdef RPC_DEBUG
3138

0 commit comments

Comments
 (0)