Commit bfd8e5a4 authored by Eric Dumazet's avatar Eric Dumazet Committed by David S. Miller

ipv6: avoid zeroing per cpu data again

per cpu allocations are already zeroed, no need to clear them again.

Fixes: d52d3997 ("ipv6: Create percpu rt6_info")
Signed-off-by: default avatarEric Dumazet <edumazet@google.com>
Cc: Martin KaFai Lau <kafai@fb.com>
Cc: Tejun Heo <tj@kernel.org>
Acked-by: default avatarTejun Heo <tj@kernel.org>
Acked-by: default avatarMartin KaFai Lau <kafai@fb.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 410a619a
...@@ -377,17 +377,7 @@ struct rt6_info *ip6_dst_alloc(struct net *net, ...@@ -377,17 +377,7 @@ struct rt6_info *ip6_dst_alloc(struct net *net,
if (rt) { if (rt) {
rt->rt6i_pcpu = alloc_percpu_gfp(struct rt6_info *, GFP_ATOMIC); rt->rt6i_pcpu = alloc_percpu_gfp(struct rt6_info *, GFP_ATOMIC);
if (rt->rt6i_pcpu) { if (!rt->rt6i_pcpu) {
int cpu;
for_each_possible_cpu(cpu) {
struct rt6_info **p;
p = per_cpu_ptr(rt->rt6i_pcpu, cpu);
/* no one shares rt */
*p = NULL;
}
} else {
dst_release_immediate(&rt->dst); dst_release_immediate(&rt->dst);
return NULL; return NULL;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment