aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--include/linux/sunrpc/clnt.h2
-rw-r--r--include/linux/sunrpc/xprt.h1
-rw-r--r--net/sunrpc/clnt.c3
-rw-r--r--net/sunrpc/pmap_clnt.c4
-rw-r--r--net/sunrpc/xprtsock.c2
5 files changed, 7 insertions, 5 deletions
diff --git a/include/linux/sunrpc/clnt.h b/include/linux/sunrpc/clnt.h
index 00e9dbaec9c5..2e68ac0aa022 100644
--- a/include/linux/sunrpc/clnt.h
+++ b/include/linux/sunrpc/clnt.h
@@ -106,7 +106,7 @@ struct rpc_clnt *rpc_clone_client(struct rpc_clnt *);
106int rpc_shutdown_client(struct rpc_clnt *); 106int rpc_shutdown_client(struct rpc_clnt *);
107int rpc_destroy_client(struct rpc_clnt *); 107int rpc_destroy_client(struct rpc_clnt *);
108void rpc_release_client(struct rpc_clnt *); 108void rpc_release_client(struct rpc_clnt *);
109void rpc_getport(struct rpc_task *, struct rpc_clnt *); 109void rpc_getport(struct rpc_task *);
110int rpc_register(u32, u32, int, unsigned short, int *); 110int rpc_register(u32, u32, int, unsigned short, int *);
111 111
112void rpc_call_setup(struct rpc_task *, struct rpc_message *, int); 112void rpc_call_setup(struct rpc_task *, struct rpc_message *, int);
diff --git a/include/linux/sunrpc/xprt.h b/include/linux/sunrpc/xprt.h
index 4ce82616873d..84122559fa17 100644
--- a/include/linux/sunrpc/xprt.h
+++ b/include/linux/sunrpc/xprt.h
@@ -105,6 +105,7 @@ struct rpc_xprt_ops {
105 void (*set_buffer_size)(struct rpc_xprt *xprt, size_t sndsize, size_t rcvsize); 105 void (*set_buffer_size)(struct rpc_xprt *xprt, size_t sndsize, size_t rcvsize);
106 int (*reserve_xprt)(struct rpc_task *task); 106 int (*reserve_xprt)(struct rpc_task *task);
107 void (*release_xprt)(struct rpc_xprt *xprt, struct rpc_task *task); 107 void (*release_xprt)(struct rpc_xprt *xprt, struct rpc_task *task);
108 void (*rpcbind)(struct rpc_task *task);
108 void (*set_port)(struct rpc_xprt *xprt, unsigned short port); 109 void (*set_port)(struct rpc_xprt *xprt, unsigned short port);
109 void (*connect)(struct rpc_task *task); 110 void (*connect)(struct rpc_task *task);
110 void * (*buf_alloc)(struct rpc_task *task, size_t size); 111 void * (*buf_alloc)(struct rpc_task *task, size_t size);
diff --git a/net/sunrpc/clnt.c b/net/sunrpc/clnt.c
index cee504162a3f..d003c2f5688f 100644
--- a/net/sunrpc/clnt.c
+++ b/net/sunrpc/clnt.c
@@ -774,7 +774,6 @@ call_encode(struct rpc_task *task)
774static void 774static void
775call_bind(struct rpc_task *task) 775call_bind(struct rpc_task *task)
776{ 776{
777 struct rpc_clnt *clnt = task->tk_client;
778 struct rpc_xprt *xprt = task->tk_xprt; 777 struct rpc_xprt *xprt = task->tk_xprt;
779 778
780 dprintk("RPC: %4d call_bind (status %d)\n", 779 dprintk("RPC: %4d call_bind (status %d)\n",
@@ -784,7 +783,7 @@ call_bind(struct rpc_task *task)
784 if (!xprt_bound(xprt)) { 783 if (!xprt_bound(xprt)) {
785 task->tk_action = call_bind_status; 784 task->tk_action = call_bind_status;
786 task->tk_timeout = xprt->bind_timeout; 785 task->tk_timeout = xprt->bind_timeout;
787 rpc_getport(task, clnt); 786 xprt->ops->rpcbind(task);
788 } 787 }
789} 788}
790 789
diff --git a/net/sunrpc/pmap_clnt.c b/net/sunrpc/pmap_clnt.c
index 0efcbf1302a2..f7b279a63baa 100644
--- a/net/sunrpc/pmap_clnt.c
+++ b/net/sunrpc/pmap_clnt.c
@@ -81,13 +81,13 @@ static inline void pmap_wake_portmap_waiters(struct rpc_xprt *xprt)
81/** 81/**
82 * rpc_getport - obtain the port for a given RPC service on a given host 82 * rpc_getport - obtain the port for a given RPC service on a given host
83 * @task: task that is waiting for portmapper request 83 * @task: task that is waiting for portmapper request
84 * @clnt: controlling rpc_clnt
85 * 84 *
86 * This one can be called for an ongoing RPC request, and can be used in 85 * This one can be called for an ongoing RPC request, and can be used in
87 * an async (rpciod) context. 86 * an async (rpciod) context.
88 */ 87 */
89void rpc_getport(struct rpc_task *task, struct rpc_clnt *clnt) 88void rpc_getport(struct rpc_task *task)
90{ 89{
90 struct rpc_clnt *clnt = task->tk_client;
91 struct rpc_xprt *xprt = task->tk_xprt; 91 struct rpc_xprt *xprt = task->tk_xprt;
92 struct sockaddr_in *sap = &xprt->addr; 92 struct sockaddr_in *sap = &xprt->addr;
93 struct portmap_args *map; 93 struct portmap_args *map;
diff --git a/net/sunrpc/xprtsock.c b/net/sunrpc/xprtsock.c
index 123ac1e5ba15..4c98b89a5b48 100644
--- a/net/sunrpc/xprtsock.c
+++ b/net/sunrpc/xprtsock.c
@@ -1262,6 +1262,7 @@ static struct rpc_xprt_ops xs_udp_ops = {
1262 .set_buffer_size = xs_udp_set_buffer_size, 1262 .set_buffer_size = xs_udp_set_buffer_size,
1263 .reserve_xprt = xprt_reserve_xprt_cong, 1263 .reserve_xprt = xprt_reserve_xprt_cong,
1264 .release_xprt = xprt_release_xprt_cong, 1264 .release_xprt = xprt_release_xprt_cong,
1265 .rpcbind = rpc_getport,
1265 .set_port = xs_set_port, 1266 .set_port = xs_set_port,
1266 .connect = xs_connect, 1267 .connect = xs_connect,
1267 .buf_alloc = rpc_malloc, 1268 .buf_alloc = rpc_malloc,
@@ -1278,6 +1279,7 @@ static struct rpc_xprt_ops xs_udp_ops = {
1278static struct rpc_xprt_ops xs_tcp_ops = { 1279static struct rpc_xprt_ops xs_tcp_ops = {
1279 .reserve_xprt = xprt_reserve_xprt, 1280 .reserve_xprt = xprt_reserve_xprt,
1280 .release_xprt = xs_tcp_release_xprt, 1281 .release_xprt = xs_tcp_release_xprt,
1282 .rpcbind = rpc_getport,
1281 .set_port = xs_set_port, 1283 .set_port = xs_set_port,
1282 .connect = xs_connect, 1284 .connect = xs_connect,
1283 .buf_alloc = rpc_malloc, 1285 .buf_alloc = rpc_malloc,