diff options
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/sunrpc/clnt.h | 2 | ||||
| -rw-r--r-- | include/linux/sunrpc/svcsock.h | 1 | ||||
| -rw-r--r-- | include/linux/sunrpc/xprt.h | 13 |
3 files changed, 15 insertions, 1 deletions
diff --git a/include/linux/sunrpc/clnt.h b/include/linux/sunrpc/clnt.h index 8af2804bab16..70736b98c721 100644 --- a/include/linux/sunrpc/clnt.h +++ b/include/linux/sunrpc/clnt.h | |||
| @@ -130,6 +130,8 @@ struct rpc_create_args { | |||
| 130 | #define RPC_CLNT_CREATE_NO_RETRANS_TIMEOUT (1UL << 9) | 130 | #define RPC_CLNT_CREATE_NO_RETRANS_TIMEOUT (1UL << 9) |
| 131 | 131 | ||
| 132 | struct rpc_clnt *rpc_create(struct rpc_create_args *args); | 132 | struct rpc_clnt *rpc_create(struct rpc_create_args *args); |
| 133 | struct rpc_clnt *rpc_create_xprt(struct rpc_create_args *args, | ||
| 134 | struct rpc_xprt *xprt); | ||
| 133 | struct rpc_clnt *rpc_bind_new_program(struct rpc_clnt *, | 135 | struct rpc_clnt *rpc_bind_new_program(struct rpc_clnt *, |
| 134 | const struct rpc_program *, u32); | 136 | const struct rpc_program *, u32); |
| 135 | void rpc_task_reset_client(struct rpc_task *task, struct rpc_clnt *clnt); | 137 | void rpc_task_reset_client(struct rpc_task *task, struct rpc_clnt *clnt); |
diff --git a/include/linux/sunrpc/svcsock.h b/include/linux/sunrpc/svcsock.h index 62fd1b756e99..947009ed5996 100644 --- a/include/linux/sunrpc/svcsock.h +++ b/include/linux/sunrpc/svcsock.h | |||
| @@ -56,6 +56,7 @@ int svc_recv(struct svc_rqst *, long); | |||
| 56 | int svc_send(struct svc_rqst *); | 56 | int svc_send(struct svc_rqst *); |
| 57 | void svc_drop(struct svc_rqst *); | 57 | void svc_drop(struct svc_rqst *); |
| 58 | void svc_sock_update_bufs(struct svc_serv *serv); | 58 | void svc_sock_update_bufs(struct svc_serv *serv); |
| 59 | bool svc_alien_sock(struct net *net, int fd); | ||
| 59 | int svc_addsock(struct svc_serv *serv, const int fd, | 60 | int svc_addsock(struct svc_serv *serv, const int fd, |
| 60 | char *name_return, const size_t len); | 61 | char *name_return, const size_t len); |
| 61 | void svc_init_xprt_sock(void); | 62 | void svc_init_xprt_sock(void); |
diff --git a/include/linux/sunrpc/xprt.h b/include/linux/sunrpc/xprt.h index 8097b9df6773..3e5efb2b236e 100644 --- a/include/linux/sunrpc/xprt.h +++ b/include/linux/sunrpc/xprt.h | |||
| @@ -295,13 +295,24 @@ int xprt_adjust_timeout(struct rpc_rqst *req); | |||
| 295 | void xprt_release_xprt(struct rpc_xprt *xprt, struct rpc_task *task); | 295 | void xprt_release_xprt(struct rpc_xprt *xprt, struct rpc_task *task); |
| 296 | void xprt_release_xprt_cong(struct rpc_xprt *xprt, struct rpc_task *task); | 296 | void xprt_release_xprt_cong(struct rpc_xprt *xprt, struct rpc_task *task); |
| 297 | void xprt_release(struct rpc_task *task); | 297 | void xprt_release(struct rpc_task *task); |
| 298 | struct rpc_xprt * xprt_get(struct rpc_xprt *xprt); | ||
| 299 | void xprt_put(struct rpc_xprt *xprt); | 298 | void xprt_put(struct rpc_xprt *xprt); |
| 300 | struct rpc_xprt * xprt_alloc(struct net *net, size_t size, | 299 | struct rpc_xprt * xprt_alloc(struct net *net, size_t size, |
| 301 | unsigned int num_prealloc, | 300 | unsigned int num_prealloc, |
| 302 | unsigned int max_req); | 301 | unsigned int max_req); |
| 303 | void xprt_free(struct rpc_xprt *); | 302 | void xprt_free(struct rpc_xprt *); |
| 304 | 303 | ||
| 304 | /** | ||
| 305 | * xprt_get - return a reference to an RPC transport. | ||
| 306 | * @xprt: pointer to the transport | ||
| 307 | * | ||
| 308 | */ | ||
| 309 | static inline struct rpc_xprt *xprt_get(struct rpc_xprt *xprt) | ||
| 310 | { | ||
| 311 | if (atomic_inc_not_zero(&xprt->count)) | ||
| 312 | return xprt; | ||
| 313 | return NULL; | ||
| 314 | } | ||
| 315 | |||
| 305 | static inline __be32 *xprt_skip_transport_header(struct rpc_xprt *xprt, __be32 *p) | 316 | static inline __be32 *xprt_skip_transport_header(struct rpc_xprt *xprt, __be32 *p) |
| 306 | { | 317 | { |
| 307 | return p + xprt->tsh_size; | 318 | return p + xprt->tsh_size; |
