@@ -1846,10 +1846,15 @@ static inline int sk_rx_queue_get(const struct sock *sk)
}
#endif
+static inline void __sk_set_socket(struct sock *sk, struct socket *sock)
+{
+ sk->sk_socket = sock;
+}
+
static inline void sk_set_socket(struct sock *sk, struct socket *sock)
{
sk_tx_queue_clear(sk);
- sk->sk_socket = sock;
+ __sk_set_socket(sk, sock);
}
static inline wait_queue_head_t *sk_sleep(struct sock *sk)
@@ -1868,7 +1873,7 @@ static inline void sock_orphan(struct sock *sk)
{
write_lock_bh(&sk->sk_callback_lock);
sock_set_flag(sk, SOCK_DEAD);
- sk_set_socket(sk, NULL);
+ __sk_set_socket(sk, NULL);
sk->sk_wq = NULL;
write_unlock_bh(&sk->sk_callback_lock);
}