From b2a9c0ed75a32e788d034a58a18f2fc46396e412 Mon Sep 17 00:00:00 2001 From: Wei Wang Date: Sat, 17 Jun 2017 10:42:41 -0700 Subject: net: remove DST_NOGC flag Now that all the components have been changed to release dst based on refcnt only and not depend on dst gc anymore, we can remove the temporary flag DST_NOGC. Note that we also need to remove the DST_NOCACHE check in dst_release() and dst_hold_safe() because now all the dst are released based on refcnt and behaves as DST_NOCACHE. Signed-off-by: Wei Wang Acked-by: Martin KaFai Lau Signed-off-by: David S. Miller --- net/core/dst.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'net/core/dst.c') diff --git a/net/core/dst.c b/net/core/dst.c index 30bea01d2262..70543dabb797 100644 --- a/net/core/dst.c +++ b/net/core/dst.c @@ -179,14 +179,12 @@ void dst_release(struct dst_entry *dst) { if (dst) { int newrefcnt; - unsigned short destroy_after_rcu = dst->flags & - (DST_NOCACHE | DST_NOGC); newrefcnt = atomic_dec_return(&dst->__refcnt); if (unlikely(newrefcnt < 0)) net_warn_ratelimited("%s: dst:%p refcnt:%d\n", __func__, dst, newrefcnt); - if (!newrefcnt && unlikely(destroy_after_rcu)) + if (!newrefcnt) call_rcu(&dst->rcu_head, dst_destroy_rcu); } } -- cgit v1.2.3