diff options
Diffstat (limited to 'include/net/sock.h')
-rw-r--r-- | include/net/sock.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/include/net/sock.h b/include/net/sock.h index af2b0544586e..c9fad6fb629b 100644 --- a/include/net/sock.h +++ b/include/net/sock.h | |||
@@ -279,7 +279,7 @@ static inline int sk_unhashed(const struct sock *sk) | |||
279 | 279 | ||
280 | static inline int sk_hashed(const struct sock *sk) | 280 | static inline int sk_hashed(const struct sock *sk) |
281 | { | 281 | { |
282 | return sk->sk_node.pprev != NULL; | 282 | return !sk_unhashed(sk); |
283 | } | 283 | } |
284 | 284 | ||
285 | static __inline__ void sk_node_init(struct hlist_node *node) | 285 | static __inline__ void sk_node_init(struct hlist_node *node) |
@@ -454,6 +454,7 @@ static inline void sk_stream_set_owner_r(struct sk_buff *skb, struct sock *sk) | |||
454 | 454 | ||
455 | static inline void sk_stream_free_skb(struct sock *sk, struct sk_buff *skb) | 455 | static inline void sk_stream_free_skb(struct sock *sk, struct sk_buff *skb) |
456 | { | 456 | { |
457 | skb_truesize_check(skb); | ||
457 | sock_set_flag(sk, SOCK_QUEUE_SHRUNK); | 458 | sock_set_flag(sk, SOCK_QUEUE_SHRUNK); |
458 | sk->sk_wmem_queued -= skb->truesize; | 459 | sk->sk_wmem_queued -= skb->truesize; |
459 | sk->sk_forward_alloc += skb->truesize; | 460 | sk->sk_forward_alloc += skb->truesize; |