summaryrefslogtreecommitdiff
path: root/net/core/dst.c
diff options
context:
space:
mode:
authorWei Wang <weiwan@google.com>2017-06-17 10:42:41 -0700
committerDavid S. Miller <davem@davemloft.net>2017-06-17 22:54:01 -0400
commitb2a9c0ed75a32e788d034a58a18f2fc46396e412 (patch)
treed50771260588554f424a00efdd296a6097722eb8 /net/core/dst.c
parent5b7c9a8ff828287af5aebe93e707271bf1a82cc3 (diff)
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 <weiwan@google.com> Acked-by: Martin KaFai Lau <kafai@fb.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/core/dst.c')
-rw-r--r--net/core/dst.c4
1 files changed, 1 insertions, 3 deletions
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);
}
}