aboutsummaryrefslogtreecommitdiffstats
path: root/net/sunrpc/clnt.c
diff options
context:
space:
mode:
authorChuck Lever <chuck.lever@oracle.com>2006-08-22 20:06:21 -0400
committerTrond Myklebust <Trond.Myklebust@netapp.com>2006-09-22 23:24:51 -0400
commitff9aa5e56df60cc8565a93cc868fe25ae3f20e49 (patch)
treeae1045652699feacd18aecbc7023edd430c2695e /net/sunrpc/clnt.c
parent9e1968c58d72c4b85d8a69bda1e194f9701fb224 (diff)
SUNRPC: Eliminate xprt_create_proto and rpc_create_client
The two function call API for creating a new RPC client is now obsolete. Remove it. Also, remove an unnecessary check to see whether the caller is capable of using privileged network services. The kernel RPC client always uses a privileged ephemeral port by default; callers are responsible for checking the authority of users to make use of any RPC service, or for specifying that a nonprivileged port is acceptable. Test plan: Repeated runs of Connectathon locking suite. Check network trace to ensure correctness of NLM requests and replies. Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'net/sunrpc/clnt.c')
-rw-r--r--net/sunrpc/clnt.c42
1 files changed, 1 insertions, 41 deletions
diff --git a/net/sunrpc/clnt.c b/net/sunrpc/clnt.c
index dbb93bdf6cc9..428704dd5b3e 100644
--- a/net/sunrpc/clnt.c
+++ b/net/sunrpc/clnt.c
@@ -97,17 +97,7 @@ rpc_setup_pipedir(struct rpc_clnt *clnt, char *dir_name)
97 } 97 }
98} 98}
99 99
100/* 100static struct rpc_clnt * rpc_new_client(struct rpc_xprt *xprt, char *servname, struct rpc_program *program, u32 vers, rpc_authflavor_t flavor)
101 * Create an RPC client
102 * FIXME: This should also take a flags argument (as in task->tk_flags).
103 * It's called (among others) from pmap_create_client, which may in
104 * turn be called by an async task. In this case, rpciod should not be
105 * made to sleep too long.
106 */
107struct rpc_clnt *
108rpc_new_client(struct rpc_xprt *xprt, char *servname,
109 struct rpc_program *program, u32 vers,
110 rpc_authflavor_t flavor)
111{ 101{
112 struct rpc_version *version; 102 struct rpc_version *version;
113 struct rpc_clnt *clnt = NULL; 103 struct rpc_clnt *clnt = NULL;
@@ -253,36 +243,6 @@ struct rpc_clnt *rpc_create(struct rpc_create_args *args)
253} 243}
254EXPORT_SYMBOL(rpc_create); 244EXPORT_SYMBOL(rpc_create);
255 245
256/**
257 * Create an RPC client
258 * @xprt - pointer to xprt struct
259 * @servname - name of server
260 * @info - rpc_program
261 * @version - rpc_program version
262 * @authflavor - rpc_auth flavour to use
263 *
264 * Creates an RPC client structure, then pings the server in order to
265 * determine if it is up, and if it supports this program and version.
266 *
267 * This function should never be called by asynchronous tasks such as
268 * the portmapper.
269 */
270struct rpc_clnt *rpc_create_client(struct rpc_xprt *xprt, char *servname,
271 struct rpc_program *info, u32 version, rpc_authflavor_t authflavor)
272{
273 struct rpc_clnt *clnt;
274 int err;
275
276 clnt = rpc_new_client(xprt, servname, info, version, authflavor);
277 if (IS_ERR(clnt))
278 return clnt;
279 err = rpc_ping(clnt, RPC_TASK_SOFT|RPC_TASK_NOINTR);
280 if (err == 0)
281 return clnt;
282 rpc_shutdown_client(clnt);
283 return ERR_PTR(err);
284}
285
286/* 246/*
287 * This function clones the RPC client structure. It allows us to share the 247 * This function clones the RPC client structure. It allows us to share the
288 * same transport while varying parameters such as the authentication 248 * same transport while varying parameters such as the authentication