aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric Dumazet <[email protected]>2017-10-09 06:01:37 -0700
committerDavid S. Miller <[email protected]>2017-10-09 10:29:39 -0700
commitbfd8e5a407133e58a92a38ccf3d0ba6db81f22d8 (patch)
tree346ce561468c4a196859b42728c07b1b9f099d6a
parent410a619adc1a7032e264d991feecb8d42aca89e4 (diff)
ipv6: avoid zeroing per cpu data again
per cpu allocations are already zeroed, no need to clear them again. Fixes: d52d3997f843f ("ipv6: Create percpu rt6_info") Signed-off-by: Eric Dumazet <[email protected]> Cc: Martin KaFai Lau <[email protected]> Cc: Tejun Heo <[email protected]> Acked-by: Tejun Heo <[email protected]> Acked-by: Martin KaFai Lau <[email protected]> Signed-off-by: David S. Miller <[email protected]>
-rw-r--r--net/ipv6/route.c12
1 files changed, 1 insertions, 11 deletions
diff --git a/net/ipv6/route.c b/net/ipv6/route.c
index 606e80325b21..3d7d4e09301e 100644
--- a/net/ipv6/route.c
+++ b/net/ipv6/route.c
@@ -377,17 +377,7 @@ struct rt6_info *ip6_dst_alloc(struct net *net,
if (rt) {
rt->rt6i_pcpu = alloc_percpu_gfp(struct rt6_info *, GFP_ATOMIC);
- 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 {
+ if (!rt->rt6i_pcpu) {
dst_release_immediate(&rt->dst);
return NULL;
}