]> Pileus Git - ~andy/linux/blobdiff - net/sunrpc/clnt.c
[NETFILTER]: nf_queue: don't copy registered rerouter data
[~andy/linux] / net / sunrpc / clnt.c
index a44da8b3d24076383c97574f4bb27cb957f22eb8..d2f0550c4ba03709f23a3b3dc9f5252105f4aad8 100644 (file)
@@ -118,7 +118,7 @@ rpc_new_client(struct rpc_xprt *xprt, char *servname,
                goto out_err;
 
        err = -ENOMEM;
-       clnt = (struct rpc_clnt *) kmalloc(sizeof(*clnt), GFP_KERNEL);
+       clnt = kmalloc(sizeof(*clnt), GFP_KERNEL);
        if (!clnt)
                goto out_err;
        memset(clnt, 0, sizeof(*clnt));
@@ -225,7 +225,7 @@ rpc_clone_client(struct rpc_clnt *clnt)
 {
        struct rpc_clnt *new;
 
-       new = (struct rpc_clnt *)kmalloc(sizeof(*new), GFP_KERNEL);
+       new = kmalloc(sizeof(*new), GFP_KERNEL);
        if (!new)
                goto out_no_clnt;
        memcpy(new, clnt, sizeof(*new));
@@ -269,7 +269,7 @@ rpc_shutdown_client(struct rpc_clnt *clnt)
                clnt->cl_dead = 0;
                rpc_killall_tasks(clnt);
                wait_event_timeout(destroy_wait,
-                       atomic_read(&clnt->cl_users) > 0, 1*HZ);
+                       !atomic_read(&clnt->cl_users), 1*HZ);
        }
 
        if (atomic_read(&clnt->cl_users) < 0) {