diff options
Diffstat (limited to 'include/net')
-rw-r--r-- | include/net/sock.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/include/net/sock.h b/include/net/sock.h index 416bc994adad..e178b49eefbb 100644 --- a/include/net/sock.h +++ b/include/net/sock.h | |||
@@ -445,7 +445,7 @@ static inline int sk_acceptq_is_full(struct sock *sk) | |||
445 | */ | 445 | */ |
446 | static inline int sk_stream_min_wspace(struct sock *sk) | 446 | static inline int sk_stream_min_wspace(struct sock *sk) |
447 | { | 447 | { |
448 | return sk->sk_wmem_queued / 2; | 448 | return sk->sk_wmem_queued >> 1; |
449 | } | 449 | } |
450 | 450 | ||
451 | static inline int sk_stream_wspace(struct sock *sk) | 451 | static inline int sk_stream_wspace(struct sock *sk) |
@@ -1187,7 +1187,7 @@ static inline void sk_wake_async(struct sock *sk, int how, int band) | |||
1187 | static inline void sk_stream_moderate_sndbuf(struct sock *sk) | 1187 | static inline void sk_stream_moderate_sndbuf(struct sock *sk) |
1188 | { | 1188 | { |
1189 | if (!(sk->sk_userlocks & SOCK_SNDBUF_LOCK)) { | 1189 | if (!(sk->sk_userlocks & SOCK_SNDBUF_LOCK)) { |
1190 | sk->sk_sndbuf = min(sk->sk_sndbuf, sk->sk_wmem_queued / 2); | 1190 | sk->sk_sndbuf = min(sk->sk_sndbuf, sk->sk_wmem_queued >> 1); |
1191 | sk->sk_sndbuf = max(sk->sk_sndbuf, SOCK_MIN_SNDBUF); | 1191 | sk->sk_sndbuf = max(sk->sk_sndbuf, SOCK_MIN_SNDBUF); |
1192 | } | 1192 | } |
1193 | } | 1193 | } |
@@ -1211,7 +1211,7 @@ static inline struct page *sk_stream_alloc_page(struct sock *sk) | |||
1211 | */ | 1211 | */ |
1212 | static inline int sock_writeable(const struct sock *sk) | 1212 | static inline int sock_writeable(const struct sock *sk) |
1213 | { | 1213 | { |
1214 | return atomic_read(&sk->sk_wmem_alloc) < (sk->sk_sndbuf / 2); | 1214 | return atomic_read(&sk->sk_wmem_alloc) < (sk->sk_sndbuf >> 1); |
1215 | } | 1215 | } |
1216 | 1216 | ||
1217 | static inline gfp_t gfp_any(void) | 1217 | static inline gfp_t gfp_any(void) |