aboutsummaryrefslogtreecommitdiffstats
path: root/net/sunrpc/clnt.c
diff options
context:
space:
mode:
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 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;