summaryrefslogtreecommitdiff
path: root/net/ipv6/ip6_fib.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/ipv6/ip6_fib.c')
-rw-r--r--net/ipv6/ip6_fib.c15
1 files changed, 2 insertions, 13 deletions
diff --git a/net/ipv6/ip6_fib.c b/net/ipv6/ip6_fib.c
index 265401abb98e..e3b35e146eef 100644
--- a/net/ipv6/ip6_fib.c
+++ b/net/ipv6/ip6_fib.c
@@ -153,11 +153,6 @@ static void node_free(struct fib6_node *fn)
kmem_cache_free(fib6_node_kmem, fn);
}
-static void rt6_rcu_free(struct rt6_info *rt)
-{
- call_rcu(&rt->dst.rcu_head, dst_rcu_free);
-}
-
static void rt6_free_pcpu(struct rt6_info *non_pcpu_rt)
{
int cpu;
@@ -174,7 +169,6 @@ static void rt6_free_pcpu(struct rt6_info *non_pcpu_rt)
if (pcpu_rt) {
dst_dev_put(&pcpu_rt->dst);
dst_release(&pcpu_rt->dst);
- rt6_rcu_free(pcpu_rt);
*ppcpu_rt = NULL;
}
}
@@ -189,7 +183,6 @@ static void rt6_release(struct rt6_info *rt)
rt6_free_pcpu(rt);
dst_dev_put(&rt->dst);
dst_release(&rt->dst);
- rt6_rcu_free(rt);
}
}
@@ -1108,9 +1101,7 @@ out:
/* Always release dst as dst->__refcnt is guaranteed
* to be taken before entering this function
*/
- dst_release(&rt->dst);
- if (!(rt->dst.flags & DST_NOCACHE))
- dst_free(&rt->dst);
+ dst_release_immediate(&rt->dst);
}
return err;
@@ -1124,9 +1115,7 @@ st_failure:
/* Always release dst as dst->__refcnt is guaranteed
* to be taken before entering this function
*/
- dst_release(&rt->dst);
- if (!(rt->dst.flags & DST_NOCACHE))
- dst_free(&rt->dst);
+ dst_release_immediate(&rt->dst);
return err;
#endif
}