diff options
-rw-r--r-- | include/net/sock_api.h | 36 | ||||
-rw-r--r-- | include/net/sock_api_extra.h | 36 |
2 files changed, 36 insertions, 36 deletions
diff --git a/include/net/sock_api.h b/include/net/sock_api.h index d78bd655ddff49..c5dc5cbc0d33e7 100644 --- a/include/net/sock_api.h +++ b/include/net/sock_api.h @@ -1289,42 +1289,6 @@ static inline void dst_negative_advice(struct sock *sk) __dst_negative_advice(sk); } -static inline void -__sk_dst_set(struct sock *sk, struct dst_entry *dst) -{ - struct dst_entry *old_dst; - - sk_tx_queue_clear(sk); - sk->sk_dst_pending_confirm = 0; - old_dst = rcu_dereference_protected(sk->sk_dst_cache, - lockdep_sock_is_held(sk)); - rcu_assign_pointer(sk->sk_dst_cache, dst); - dst_release(old_dst); -} - -static inline void -sk_dst_set(struct sock *sk, struct dst_entry *dst) -{ - struct dst_entry *old_dst; - - sk_tx_queue_clear(sk); - sk->sk_dst_pending_confirm = 0; - old_dst = xchg((__force struct dst_entry **)&sk->sk_dst_cache, dst); - dst_release(old_dst); -} - -static inline void -__sk_dst_reset(struct sock *sk) -{ - __sk_dst_set(sk, NULL); -} - -static inline void -sk_dst_reset(struct sock *sk) -{ - sk_dst_set(sk, NULL); -} - struct dst_entry *__sk_dst_check(struct sock *sk, u32 cookie); struct dst_entry *sk_dst_check(struct sock *sk, u32 cookie); diff --git a/include/net/sock_api_extra.h b/include/net/sock_api_extra.h index 349210c624f671..93c4b4a729b339 100644 --- a/include/net/sock_api_extra.h +++ b/include/net/sock_api_extra.h @@ -67,4 +67,40 @@ static inline int sk_backlog_rcv(struct sock *sk, struct sk_buff *skb) sk, skb); } +static inline void +__sk_dst_set(struct sock *sk, struct dst_entry *dst) +{ + struct dst_entry *old_dst; + + sk_tx_queue_clear(sk); + sk->sk_dst_pending_confirm = 0; + old_dst = rcu_dereference_protected(sk->sk_dst_cache, + lockdep_sock_is_held(sk)); + rcu_assign_pointer(sk->sk_dst_cache, dst); + dst_release(old_dst); +} + +static inline void +sk_dst_set(struct sock *sk, struct dst_entry *dst) +{ + struct dst_entry *old_dst; + + sk_tx_queue_clear(sk); + sk->sk_dst_pending_confirm = 0; + old_dst = xchg((__force struct dst_entry **)&sk->sk_dst_cache, dst); + dst_release(old_dst); +} + +static inline void +__sk_dst_reset(struct sock *sk) +{ + __sk_dst_set(sk, NULL); +} + +static inline void +sk_dst_reset(struct sock *sk) +{ + sk_dst_set(sk, NULL); +} + #endif /* _SOCK_API_EXTRA_H */ |