From cd1062d64ea17242528d039d94cdaa52c49287d9 Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Wed, 1 Dec 2021 18:04:54 +0100 Subject: [PATCH] Revert "net: ipv6: add fib6_nh_release_dsts stub" This reverts commit 3c40584595f8175d5fd8acaac30479e16eeb8a82 which is commit 8837cbbf854246f5f4d565f21e6baa945d37aded upstream. It breaks the abi and is not needed for Android systems, so it can be safely reverted. Bug: 161946584 Signed-off-by: Greg Kroah-Hartman Change-Id: I25198224e60cb4de5c9e5186331c78e2e4c9c28c --- include/net/ip6_fib.h | 1 - include/net/ipv6_stubs.h | 1 - net/ipv6/af_inet6.c | 1 - net/ipv6/route.c | 19 ------------------- 4 files changed, 22 deletions(-) diff --git a/include/net/ip6_fib.h b/include/net/ip6_fib.h index a99bfc38475c..bd4bfdd30e28 100644 --- a/include/net/ip6_fib.h +++ b/include/net/ip6_fib.h @@ -501,7 +501,6 @@ int fib6_nh_init(struct net *net, struct fib6_nh *fib6_nh, struct fib6_config *cfg, gfp_t gfp_flags, struct netlink_ext_ack *extack); void fib6_nh_release(struct fib6_nh *fib6_nh); -void fib6_nh_release_dsts(struct fib6_nh *fib6_nh); int call_fib6_entry_notifiers(struct net *net, enum fib_event_type event_type, diff --git a/include/net/ipv6_stubs.h b/include/net/ipv6_stubs.h index 14a43111ffc6..8fce558b5fea 100644 --- a/include/net/ipv6_stubs.h +++ b/include/net/ipv6_stubs.h @@ -47,7 +47,6 @@ struct ipv6_stub { struct fib6_config *cfg, gfp_t gfp_flags, struct netlink_ext_ack *extack); void (*fib6_nh_release)(struct fib6_nh *fib6_nh); - void (*fib6_nh_release_dsts)(struct fib6_nh *fib6_nh); void (*fib6_update_sernum)(struct net *net, struct fib6_info *rt); int (*ip6_del_rt)(struct net *net, struct fib6_info *rt, bool skip_notify); void (*fib6_rt_update)(struct net *net, struct fib6_info *rt, diff --git a/net/ipv6/af_inet6.c b/net/ipv6/af_inet6.c index 1fbc6c989a7c..c6db41b5063f 100644 --- a/net/ipv6/af_inet6.c +++ b/net/ipv6/af_inet6.c @@ -1018,7 +1018,6 @@ static const struct ipv6_stub ipv6_stub_impl = { .ip6_mtu_from_fib6 = ip6_mtu_from_fib6, .fib6_nh_init = fib6_nh_init, .fib6_nh_release = fib6_nh_release, - .fib6_nh_release_dsts = fib6_nh_release_dsts, .fib6_update_sernum = fib6_update_sernum_stub, .fib6_rt_update = fib6_rt_update, .ip6_del_rt = ip6_del_rt, diff --git a/net/ipv6/route.c b/net/ipv6/route.c index ae3d8c5a80cc..92835e634966 100644 --- a/net/ipv6/route.c +++ b/net/ipv6/route.c @@ -3570,25 +3570,6 @@ void fib6_nh_release(struct fib6_nh *fib6_nh) fib_nh_common_release(&fib6_nh->nh_common); } -void fib6_nh_release_dsts(struct fib6_nh *fib6_nh) -{ - int cpu; - - if (!fib6_nh->rt6i_pcpu) - return; - - for_each_possible_cpu(cpu) { - struct rt6_info *pcpu_rt, **ppcpu_rt; - - ppcpu_rt = per_cpu_ptr(fib6_nh->rt6i_pcpu, cpu); - pcpu_rt = xchg(ppcpu_rt, NULL); - if (pcpu_rt) { - dst_dev_put(&pcpu_rt->dst); - dst_release(&pcpu_rt->dst); - } - } -} - static struct fib6_info *ip6_route_info_create(struct fib6_config *cfg, gfp_t gfp_flags, struct netlink_ext_ack *extack)