Merge branch 'master'
[safe/jmp/linux-2.6] / net / sunrpc / pmap_clnt.c
index 97c420f..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,7 +210,7 @@ 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)) {