diff options
| author | Greg Kroah-Hartman <[email protected]> | 2017-10-09 07:02:35 +0000 |
|---|---|---|
| committer | Greg Kroah-Hartman <[email protected]> | 2017-10-09 07:02:35 +0000 |
| commit | 1236d6bb6e19fc72ffc6bbcdeb1bfefe450e54ee (patch) | |
| tree | 47da3feee8e263e8c9352c85cf518e624be3c211 /include/net/dst.h | |
| parent | staging: irda: au1k_ir.c fix warning: Prefer [subsystem eg: netdev]_info([sub... (diff) | |
| parent | Linux 4.14-rc4 (diff) | |
| download | kernel-1236d6bb6e19fc72ffc6bbcdeb1bfefe450e54ee.tar.gz kernel-1236d6bb6e19fc72ffc6bbcdeb1bfefe450e54ee.zip | |
Merge 4.14-rc4 into staging-next
We want the staging/iio fixes in here as well to handle merge issues.
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Diffstat (limited to 'include/net/dst.h')
| -rw-r--r-- | include/net/dst.h | 22 |
1 files changed, 4 insertions, 18 deletions
diff --git a/include/net/dst.h b/include/net/dst.h index 93568bd0a352..06a6765da074 100644 --- a/include/net/dst.h +++ b/include/net/dst.h @@ -271,7 +271,7 @@ static inline void dst_use_noref(struct dst_entry *dst, unsigned long time) static inline struct dst_entry *dst_clone(struct dst_entry *dst) { if (dst) - atomic_inc(&dst->__refcnt); + dst_hold(dst); return dst; } @@ -312,21 +312,6 @@ static inline void skb_dst_copy(struct sk_buff *nskb, const struct sk_buff *oskb } /** - * skb_dst_force - makes sure skb dst is refcounted - * @skb: buffer - * - * If dst is not yet refcounted, let's do it - */ -static inline void skb_dst_force(struct sk_buff *skb) -{ - if (skb_dst_is_noref(skb)) { - WARN_ON(!rcu_read_lock_held()); - skb->_skb_refdst &= ~SKB_DST_NOREF; - dst_clone(skb_dst(skb)); - } -} - -/** * dst_hold_safe - Take a reference on a dst if possible * @dst: pointer to dst entry * @@ -339,16 +324,17 @@ static inline bool dst_hold_safe(struct dst_entry *dst) } /** - * skb_dst_force_safe - makes sure skb dst is refcounted + * skb_dst_force - makes sure skb dst is refcounted * @skb: buffer * * If dst is not yet refcounted and not destroyed, grab a ref on it. */ -static inline void skb_dst_force_safe(struct sk_buff *skb) +static inline void skb_dst_force(struct sk_buff *skb) { if (skb_dst_is_noref(skb)) { struct dst_entry *dst = skb_dst(skb); + WARN_ON(!rcu_read_lock_held()); if (!dst_hold_safe(dst)) dst = NULL; |
