diff options
author | Arnaldo Carvalho de Melo <acme@mandriva.com> | 2006-11-20 22:21:34 -0500 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2006-12-03 00:30:20 -0500 |
commit | e69062b4f728dca01ec1a9eb4ed55b73a374f164 (patch) | |
tree | 6f8fe0800c07bb53a47bab00e8dfdb4ff9a912e2 /net/sunrpc/clnt.c | |
parent | af997d8c9568d556cd0a362d56de9fb14a6a012a (diff) |
[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.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/net/sunrpc/clnt.c b/net/sunrpc/clnt.c index 78696f2dc7d6..dfeea4fea95a 100644 --- a/net/sunrpc/clnt.c +++ b/net/sunrpc/clnt.c | |||
@@ -253,10 +253,9 @@ rpc_clone_client(struct rpc_clnt *clnt) | |||
253 | { | 253 | { |
254 | struct rpc_clnt *new; | 254 | struct rpc_clnt *new; |
255 | 255 | ||
256 | new = kmalloc(sizeof(*new), GFP_KERNEL); | 256 | new = kmemdup(clnt, sizeof(*new), GFP_KERNEL); |
257 | if (!new) | 257 | if (!new) |
258 | goto out_no_clnt; | 258 | goto out_no_clnt; |
259 | memcpy(new, clnt, sizeof(*new)); | ||
260 | atomic_set(&new->cl_count, 1); | 259 | atomic_set(&new->cl_count, 1); |
261 | atomic_set(&new->cl_users, 0); | 260 | atomic_set(&new->cl_users, 0); |
262 | new->cl_parent = clnt; | 261 | new->cl_parent = clnt; |