From e69062b4f728dca01ec1a9eb4ed55b73a374f164 Mon Sep 17 00:00:00 2001 From: Arnaldo Carvalho de Melo Date: Tue, 21 Nov 2006 01:21:34 -0200 Subject: [SUNRPC]: Use k{mem,str}dup where applicable Signed-off-by: Arnaldo Carvalho de Melo --- net/sunrpc/clnt.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'net/sunrpc/clnt.c') diff --git a/net/sunrpc/clnt.c b/net/sunrpc/clnt.c index 78696f2dc7d..dfeea4fea95 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; -- cgit v1.2.3