diff options
author | Wei Wang <weiwan@google.com> | 2017-06-17 19:42:41 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2017-06-18 04:54:01 +0200 |
commit | b2a9c0ed75a32e788d034a58a18f2fc46396e412 (patch) | |
tree | d50771260588554f424a00efdd296a6097722eb8 /include/net/dst.h | |
parent | net: remove dst gc related code (diff) | |
download | linux-b2a9c0ed75a32e788d034a58a18f2fc46396e412.tar.xz 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 'include/net/dst.h')
-rw-r--r-- | include/net/dst.h | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/include/net/dst.h b/include/net/dst.h index 0c56d1fc4d7f..1be82f672c37 100644 --- a/include/net/dst.h +++ b/include/net/dst.h @@ -57,7 +57,6 @@ struct dst_entry { #define DST_XFRM_TUNNEL 0x0080 #define DST_XFRM_QUEUE 0x0100 #define DST_METADATA 0x0200 -#define DST_NOGC 0x0400 short error; @@ -336,10 +335,7 @@ static inline void skb_dst_force(struct sk_buff *skb) */ static inline bool dst_hold_safe(struct dst_entry *dst) { - if (dst->flags & (DST_NOCACHE | DST_NOGC)) - return atomic_inc_not_zero(&dst->__refcnt); - dst_hold(dst); - return true; + return atomic_inc_not_zero(&dst->__refcnt); } /** |