Skip to content

Commit 1244480

Browse files
\"Talpey, Thomas\Trond Myklebust
authored andcommitted
SUNRPC: add EXPORT_SYMBOL_GPL for generic transport functions
SUNRPC: add EXPORT_SYMBOL_GPL for generic transport functions As a preface to allowing arbitrary transport modules to be loaded dynamically, add EXPORT_SYMBOL_GPL for all generic transport functions that a transport implementation might want to use. Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Acked-by: Tom Talpey <tmt@netapp.com> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
1 parent 4f22ccc commit 1244480

5 files changed

Lines changed: 25 additions & 0 deletions

File tree

‎net/sunrpc/rpcb_clnt.c‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -415,6 +415,7 @@ void rpcb_getport_async(struct rpc_task *task)
415415
bailout_nowake:
416416
task->tk_status = status;
417417
}
418+
EXPORT_SYMBOL_GPL(rpcb_getport_async);
418419

419420
/*
420421
* Rpcbind child task calls this callback via tk_exit.

‎net/sunrpc/sched.c‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -777,6 +777,7 @@ void *rpc_malloc(struct rpc_task *task, size_t size)
777777
task->tk_pid, size, buf);
778778
return &buf->data;
779779
}
780+
EXPORT_SYMBOL_GPL(rpc_malloc);
780781

781782
/**
782783
* rpc_free - free buffer allocated via rpc_malloc
@@ -802,6 +803,7 @@ void rpc_free(void *buffer)
802803
else
803804
kfree(buf);
804805
}
806+
EXPORT_SYMBOL_GPL(rpc_free);
805807

806808
/*
807809
* Creation and deletion of RPC task structures

‎net/sunrpc/socklib.c‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ size_t xdr_skb_read_bits(struct xdr_skb_reader *desc, void *to, size_t len)
3434
desc->offset += len;
3535
return len;
3636
}
37+
EXPORT_SYMBOL_GPL(xdr_skb_read_bits);
3738

3839
/**
3940
* xdr_skb_read_and_csum_bits - copy and checksum from skb to buffer
@@ -137,6 +138,7 @@ ssize_t xdr_partial_copy_from_skb(struct xdr_buf *xdr, unsigned int base, struct
137138
out:
138139
return copied;
139140
}
141+
EXPORT_SYMBOL_GPL(xdr_partial_copy_from_skb);
140142

141143
/**
142144
* csum_partial_copy_to_xdr - checksum and copy data
@@ -179,3 +181,4 @@ int csum_partial_copy_to_xdr(struct xdr_buf *xdr, struct sk_buff *skb)
179181
return -1;
180182
return 0;
181183
}
184+
EXPORT_SYMBOL_GPL(csum_partial_copy_to_xdr);

‎net/sunrpc/timer.c‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717

1818
#include <linux/types.h>
1919
#include <linux/unistd.h>
20+
#include <linux/module.h>
2021

2122
#include <linux/sunrpc/clnt.h>
2223

@@ -40,6 +41,7 @@ rpc_init_rtt(struct rpc_rtt *rt, unsigned long timeo)
4041
rt->ntimeouts[i] = 0;
4142
}
4243
}
44+
EXPORT_SYMBOL_GPL(rpc_init_rtt);
4345

4446
/*
4547
* NB: When computing the smoothed RTT and standard deviation,
@@ -75,6 +77,7 @@ rpc_update_rtt(struct rpc_rtt *rt, unsigned timer, long m)
7577
if (*sdrtt < RPC_RTO_MIN)
7678
*sdrtt = RPC_RTO_MIN;
7779
}
80+
EXPORT_SYMBOL_GPL(rpc_update_rtt);
7881

7982
/*
8083
* Estimate rto for an nfs rpc sent via. an unreliable datagram.
@@ -103,3 +106,4 @@ rpc_calc_rto(struct rpc_rtt *rt, unsigned timer)
103106

104107
return res;
105108
}
109+
EXPORT_SYMBOL_GPL(rpc_calc_rto);

‎net/sunrpc/xprt.c‎

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,7 @@ int xprt_reserve_xprt(struct rpc_task *task)
118118
rpc_sleep_on(&xprt->sending, task, NULL, NULL);
119119
return 0;
120120
}
121+
EXPORT_SYMBOL_GPL(xprt_reserve_xprt);
121122

122123
static void xprt_clear_locked(struct rpc_xprt *xprt)
123124
{
@@ -167,6 +168,7 @@ int xprt_reserve_xprt_cong(struct rpc_task *task)
167168
rpc_sleep_on(&xprt->sending, task, NULL, NULL);
168169
return 0;
169170
}
171+
EXPORT_SYMBOL_GPL(xprt_reserve_xprt_cong);
170172

171173
static inline int xprt_lock_write(struct rpc_xprt *xprt, struct rpc_task *task)
172174
{
@@ -246,6 +248,7 @@ void xprt_release_xprt(struct rpc_xprt *xprt, struct rpc_task *task)
246248
__xprt_lock_write_next(xprt);
247249
}
248250
}
251+
EXPORT_SYMBOL_GPL(xprt_release_xprt);
249252

250253
/**
251254
* xprt_release_xprt_cong - allow other requests to use a transport
@@ -262,6 +265,7 @@ void xprt_release_xprt_cong(struct rpc_xprt *xprt, struct rpc_task *task)
262265
__xprt_lock_write_next_cong(xprt);
263266
}
264267
}
268+
EXPORT_SYMBOL_GPL(xprt_release_xprt_cong);
265269

266270
static inline void xprt_release_write(struct rpc_xprt *xprt, struct rpc_task *task)
267271
{
@@ -314,6 +318,7 @@ void xprt_release_rqst_cong(struct rpc_task *task)
314318
{
315319
__xprt_put_cong(task->tk_xprt, task->tk_rqstp);
316320
}
321+
EXPORT_SYMBOL_GPL(xprt_release_rqst_cong);
317322

318323
/**
319324
* xprt_adjust_cwnd - adjust transport congestion window
@@ -345,6 +350,7 @@ void xprt_adjust_cwnd(struct rpc_task *task, int result)
345350
xprt->cwnd = cwnd;
346351
__xprt_put_cong(xprt, req);
347352
}
353+
EXPORT_SYMBOL_GPL(xprt_adjust_cwnd);
348354

349355
/**
350356
* xprt_wake_pending_tasks - wake all tasks on a transport's pending queue
@@ -359,6 +365,7 @@ void xprt_wake_pending_tasks(struct rpc_xprt *xprt, int status)
359365
else
360366
rpc_wake_up(&xprt->pending);
361367
}
368+
EXPORT_SYMBOL_GPL(xprt_wake_pending_tasks);
362369

363370
/**
364371
* xprt_wait_for_buffer_space - wait for transport output buffer to clear
@@ -373,6 +380,7 @@ void xprt_wait_for_buffer_space(struct rpc_task *task)
373380
task->tk_timeout = req->rq_timeout;
374381
rpc_sleep_on(&xprt->pending, task, NULL, NULL);
375382
}
383+
EXPORT_SYMBOL_GPL(xprt_wait_for_buffer_space);
376384

377385
/**
378386
* xprt_write_space - wake the task waiting for transport output buffer space
@@ -393,6 +401,7 @@ void xprt_write_space(struct rpc_xprt *xprt)
393401
}
394402
spin_unlock_bh(&xprt->transport_lock);
395403
}
404+
EXPORT_SYMBOL_GPL(xprt_write_space);
396405

397406
/**
398407
* xprt_set_retrans_timeout_def - set a request's retransmit timeout
@@ -406,6 +415,7 @@ void xprt_set_retrans_timeout_def(struct rpc_task *task)
406415
{
407416
task->tk_timeout = task->tk_rqstp->rq_timeout;
408417
}
418+
EXPORT_SYMBOL_GPL(xprt_set_retrans_timeout_def);
409419

410420
/*
411421
* xprt_set_retrans_timeout_rtt - set a request's retransmit timeout
@@ -425,6 +435,7 @@ void xprt_set_retrans_timeout_rtt(struct rpc_task *task)
425435
if (task->tk_timeout > max_timeout || task->tk_timeout == 0)
426436
task->tk_timeout = max_timeout;
427437
}
438+
EXPORT_SYMBOL_GPL(xprt_set_retrans_timeout_rtt);
428439

429440
static void xprt_reset_majortimeo(struct rpc_rqst *req)
430441
{
@@ -500,6 +511,7 @@ void xprt_disconnect(struct rpc_xprt *xprt)
500511
xprt_wake_pending_tasks(xprt, -ENOTCONN);
501512
spin_unlock_bh(&xprt->transport_lock);
502513
}
514+
EXPORT_SYMBOL_GPL(xprt_disconnect);
503515

504516
static void
505517
xprt_init_autodisconnect(unsigned long data)
@@ -610,6 +622,7 @@ struct rpc_rqst *xprt_lookup_rqst(struct rpc_xprt *xprt, __be32 xid)
610622
xprt->stat.bad_xids++;
611623
return NULL;
612624
}
625+
EXPORT_SYMBOL_GPL(xprt_lookup_rqst);
613626

614627
/**
615628
* xprt_update_rtt - update an RPC client's RTT state after receiving a reply
@@ -629,6 +642,7 @@ void xprt_update_rtt(struct rpc_task *task)
629642
rpc_set_timeo(rtt, timer, req->rq_ntrans - 1);
630643
}
631644
}
645+
EXPORT_SYMBOL_GPL(xprt_update_rtt);
632646

633647
/**
634648
* xprt_complete_rqst - called when reply processing is complete
@@ -653,6 +667,7 @@ void xprt_complete_rqst(struct rpc_task *task, int copied)
653667
req->rq_received = req->rq_private_buf.len = copied;
654668
rpc_wake_up_task(task);
655669
}
670+
EXPORT_SYMBOL_GPL(xprt_complete_rqst);
656671

657672
static void xprt_timer(struct rpc_task *task)
658673
{

0 commit comments

Comments
 (0)