summaryrefslogtreecommitdiffstats
path: root/net/sunrpc/clnt.c
diff options
context:
space:
mode:
authorArnaldo Carvalho de Melo <acme@mandriva.com>2006-11-21 01:21:34 -0200
committerDavid S. Miller <davem@sunset.davemloft.net>2006-12-02 21:30:20 -0800
commite69062b4f728dca01ec1a9eb4ed55b73a374f164 (patch)
tree6f8fe0800c07bb53a47bab00e8dfdb4ff9a912e2 /net/sunrpc/clnt.c
parentaf997d8c9568d556cd0a362d56de9fb14a6a012a (diff)
downloadop-kernel-dev-e69062b4f728dca01ec1a9eb4ed55b73a374f164.zip
op-kernel-dev-e69062b4f728dca01ec1a9eb4ed55b73a374f164.tar.gz
[SUNRPC]: Use k{mem,str}dup where applicable
Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com>
Diffstat (limited to 'net/sunrpc/clnt.c')
-rw-r--r--net/sunrpc/clnt.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/net/sunrpc/clnt.c b/net/sunrpc/clnt.c
index 78696f2..dfeea4f 100644
--- a/net/sunrpc/clnt.c
+++ b/net/sunrpc/clnt.c
@@ -253,10 +253,9 @@ rpc_clone_client(struct rpc_clnt *clnt)
{
struct rpc_clnt *new;
- new = kmalloc(sizeof(*new), GFP_KERNEL);
+ new = kmemdup(clnt, sizeof(*new), GFP_KERNEL);
if (!new)
goto out_no_clnt;
- memcpy(new, clnt, sizeof(*new));
atomic_set(&new->cl_count, 1);
atomic_set(&new->cl_users, 0);
new->cl_parent = clnt;
OpenPOWER on IntegriCloud