[TCP]: Change tcp_diag to use the existing __RTA_PUT() macro.
[powerpc.git] / net / sunrpc / pmap_clnt.c
index d0b1d2c..4e81f27 100644 (file)
@@ -53,6 +53,9 @@ rpc_getport(struct rpc_task *task, struct rpc_clnt *clnt)
                        task->tk_pid, clnt->cl_server,
                        map->pm_prog, map->pm_vers, map->pm_prot);
 
+       /* Autobind on cloned rpc clients is discouraged */
+       BUG_ON(clnt->cl_parent != clnt);
+
        spin_lock(&pmap_lock);
        if (map->pm_binding) {
                rpc_sleep_on(&map->pm_bindwait, task, NULL, NULL);
@@ -207,12 +210,10 @@ pmap_create(char *hostname, struct sockaddr_in *srvaddr, int proto)
        xprt->addr.sin_port = htons(RPC_PMAP_PORT);
 
        /* printk("pmap: create clnt\n"); */
-       clnt = rpc_create_client(xprt, hostname,
+       clnt = rpc_new_client(xprt, hostname,
                                &pmap_program, RPC_PMAP_VERSION,
                                RPC_AUTH_UNIX);
-       if (IS_ERR(clnt)) {
-               xprt_destroy(xprt);
-       } else {
+       if (!IS_ERR(clnt)) {
                clnt->cl_softrtry = 1;
                clnt->cl_chatty   = 1;
                clnt->cl_oneshot  = 1;