diff options
Diffstat (limited to 'net/sunrpc/clnt.c')
| -rw-r--r-- | net/sunrpc/clnt.c | 42 |
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 | /* | 100 | static 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 | */ | ||
| 107 | struct rpc_clnt * | ||
| 108 | rpc_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 | } |
| 254 | EXPORT_SYMBOL(rpc_create); | 244 | EXPORT_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 | */ | ||
| 270 | struct 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 |
