clnt.c (080b794ce5ad318ce34c52abaedf1bc6788a5abb) clnt.c (a613fa168afc19179a7547fbba45644c5b6912bf)
1/*
2 * linux/net/sunrpc/clnt.c
3 *
4 * This file contains the high-level RPC interface.
5 * It is modeled as a finite state machine to support both synchronous
6 * and asynchronous requests.
7 *
8 * - RPC header generation and argument serialization.

--- 224 unchanged lines hidden (view full) ---

233
234void rpc_clients_notifier_unregister(void)
235{
236 return rpc_pipefs_notifier_unregister(&rpc_clients_block);
237}
238
239static struct rpc_clnt * rpc_new_client(const struct rpc_create_args *args, struct rpc_xprt *xprt)
240{
1/*
2 * linux/net/sunrpc/clnt.c
3 *
4 * This file contains the high-level RPC interface.
5 * It is modeled as a finite state machine to support both synchronous
6 * and asynchronous requests.
7 *
8 * - RPC header generation and argument serialization.

--- 224 unchanged lines hidden (view full) ---

233
234void rpc_clients_notifier_unregister(void)
235{
236 return rpc_pipefs_notifier_unregister(&rpc_clients_block);
237}
238
239static struct rpc_clnt * rpc_new_client(const struct rpc_create_args *args, struct rpc_xprt *xprt)
240{
241 struct rpc_program *program = args->program;
242 struct rpc_version *version;
241 const struct rpc_program *program = args->program;
242 const struct rpc_version *version;
243 struct rpc_clnt *clnt = NULL;
244 struct rpc_auth *auth;
245 int err;
246 size_t len;
247
248 /* sanity check the name before trying to print it */
249 err = -EINVAL;
250 len = strlen(args->servername);

--- 370 unchanged lines hidden (view full) ---

621 * @program: rpc program to set
622 * @vers: rpc program version
623 *
624 * Clones the rpc client and sets up a new RPC program. This is mainly
625 * of use for enabling different RPC programs to share the same transport.
626 * The Sun NFSv2/v3 ACL protocol can do this.
627 */
628struct rpc_clnt *rpc_bind_new_program(struct rpc_clnt *old,
243 struct rpc_clnt *clnt = NULL;
244 struct rpc_auth *auth;
245 int err;
246 size_t len;
247
248 /* sanity check the name before trying to print it */
249 err = -EINVAL;
250 len = strlen(args->servername);

--- 370 unchanged lines hidden (view full) ---

621 * @program: rpc program to set
622 * @vers: rpc program version
623 *
624 * Clones the rpc client and sets up a new RPC program. This is mainly
625 * of use for enabling different RPC programs to share the same transport.
626 * The Sun NFSv2/v3 ACL protocol can do this.
627 */
628struct rpc_clnt *rpc_bind_new_program(struct rpc_clnt *old,
629 struct rpc_program *program,
629 const struct rpc_program *program,
630 u32 vers)
631{
632 struct rpc_clnt *clnt;
630 u32 vers)
631{
632 struct rpc_clnt *clnt;
633 struct rpc_version *version;
633 const struct rpc_version *version;
634 int err;
635
636 BUG_ON(vers >= program->nrvers || !program->version[vers]);
637 version = program->version[vers];
638 clnt = rpc_clone_client(old);
639 if (IS_ERR(clnt))
640 goto out;
641 clnt->cl_procinfo = version->procs;

--- 1319 unchanged lines hidden ---
634 int err;
635
636 BUG_ON(vers >= program->nrvers || !program->version[vers]);
637 version = program->version[vers];
638 clnt = rpc_clone_client(old);
639 if (IS_ERR(clnt))
640 goto out;
641 clnt->cl_procinfo = version->procs;

--- 1319 unchanged lines hidden ---