[SUNRPC]: Use k{mem,str}dup where applicable

Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com>
This commit is contained in:
Arnaldo Carvalho de Melo
2006-11-21 01:21:34 -02:00
committed by David S. Miller
parent af997d8c95
commit e69062b4f7
5 changed files with 6 additions and 13 deletions

View File

@@ -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;