summaryrefslogtreecommitdiffstats
path: root/net/core
diff options
context:
space:
mode:
authorWei Wang2017-06-17 19:42:41 +0200
committerDavid S. Miller2017-06-18 04:54:01 +0200
commitb2a9c0ed75a32e788d034a58a18f2fc46396e412 (patch)
treed50771260588554f424a00efdd296a6097722eb8 /net/core
parentnet: remove dst gc related code (diff)
downloadkernel-qcow2-linux-b2a9c0ed75a32e788d034a58a18f2fc46396e412.tar.gz
kernel-qcow2-linux-b2a9c0ed75a32e788d034a58a18f2fc46396e412.tar.xz
kernel-qcow2-linux-b2a9c0ed75a32e788d034a58a18f2fc46396e412.zip
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')
-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);
}
}