summaryrefslogtreecommitdiffstats
path: root/net/ipv4/fib_semantics.c
diff options
context:
space:
mode:
authorWei Wang <weiwan@google.com>2017-06-17 10:42:32 -0700
committerDavid S. Miller <davem@davemloft.net>2017-06-17 22:54:00 -0400
commitb838d5e1c5b6e57b10ec8af2268824041e3ea911 (patch)
tree129ee43f6c1a66e0c5f2c7050c0ac6b87745f958 /net/ipv4/fib_semantics.c
parent9df16efadd2a8a82731dc76ff656c771e261827f (diff)
downloadlinux-stable-b838d5e1c5b6e57b10ec8af2268824041e3ea911.tar.gz
linux-stable-b838d5e1c5b6e57b10ec8af2268824041e3ea911.tar.bz2
linux-stable-b838d5e1c5b6e57b10ec8af2268824041e3ea911.zip
ipv4: mark DST_NOGC and remove the operation of dst_free()
With the previous preparation patches, we are ready to get rid of the dst gc operation in ipv4 code and release dst based on refcnt only. So this patch adds DST_NOGC flag for all IPv4 dst and remove the calls to dst_free(). At this point, all dst created in ipv4 code do not use the dst gc anymore and will be destroyed at the point when refcnt drops to 0. Signed-off-by: Wei Wang <weiwan@google.com> Acked-by: Martin KaFai Lau <kafai@fb.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4/fib_semantics.c')
-rw-r--r--net/ipv4/fib_semantics.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/net/ipv4/fib_semantics.c b/net/ipv4/fib_semantics.c
index f163fa0a1164..ff47ea1408fe 100644
--- a/net/ipv4/fib_semantics.c
+++ b/net/ipv4/fib_semantics.c
@@ -153,8 +153,7 @@ static void rt_fibinfo_free(struct rtable __rcu **rtp)
*/
dst_dev_put(&rt->dst);
- dst_release(&rt->dst);
- dst_free(&rt->dst);
+ dst_release_immediate(&rt->dst);
}
static void free_nh_exceptions(struct fib_nh *nh)
@@ -198,8 +197,7 @@ static void rt_fibinfo_free_cpus(struct rtable __rcu * __percpu *rtp)
rt = rcu_dereference_protected(*per_cpu_ptr(rtp, cpu), 1);
if (rt) {
dst_dev_put(&rt->dst);
- dst_release(&rt->dst);
- dst_free(&rt->dst);
+ dst_release_immediate(&rt->dst);
}
}
free_percpu(rtp);