diff options
Diffstat (limited to 'net/rds/tcp_send.c')
| -rw-r--r-- | net/rds/tcp_send.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/net/rds/tcp_send.c b/net/rds/tcp_send.c index ab545e0cd5d6..2f012a07d94d 100644 --- a/net/rds/tcp_send.c +++ b/net/rds/tcp_send.c | |||
| @@ -193,9 +193,9 @@ out: | |||
| 193 | rds_tcp_stats_inc(s_tcp_sndbuf_full); | 193 | rds_tcp_stats_inc(s_tcp_sndbuf_full); |
| 194 | ret = 0; | 194 | ret = 0; |
| 195 | } else { | 195 | } else { |
| 196 | printk(KERN_WARNING "RDS/tcp: send to %u.%u.%u.%u " | 196 | printk(KERN_WARNING "RDS/tcp: send to %pI4 " |
| 197 | "returned %d, disconnecting and reconnecting\n", | 197 | "returned %d, disconnecting and reconnecting\n", |
| 198 | NIPQUAD(conn->c_faddr), ret); | 198 | &conn->c_faddr, ret); |
| 199 | rds_conn_drop(conn); | 199 | rds_conn_drop(conn); |
| 200 | } | 200 | } |
| 201 | } | 201 | } |
| @@ -224,7 +224,7 @@ void rds_tcp_write_space(struct sock *sk) | |||
| 224 | struct rds_connection *conn; | 224 | struct rds_connection *conn; |
| 225 | struct rds_tcp_connection *tc; | 225 | struct rds_tcp_connection *tc; |
| 226 | 226 | ||
| 227 | read_lock(&sk->sk_callback_lock); | 227 | read_lock_bh(&sk->sk_callback_lock); |
| 228 | conn = sk->sk_user_data; | 228 | conn = sk->sk_user_data; |
| 229 | if (conn == NULL) { | 229 | if (conn == NULL) { |
| 230 | write_space = sk->sk_write_space; | 230 | write_space = sk->sk_write_space; |
| @@ -240,9 +240,11 @@ void rds_tcp_write_space(struct sock *sk) | |||
| 240 | tc->t_last_seen_una = rds_tcp_snd_una(tc); | 240 | tc->t_last_seen_una = rds_tcp_snd_una(tc); |
| 241 | rds_send_drop_acked(conn, rds_tcp_snd_una(tc), rds_tcp_is_acked); | 241 | rds_send_drop_acked(conn, rds_tcp_snd_una(tc), rds_tcp_is_acked); |
| 242 | 242 | ||
| 243 | queue_delayed_work(rds_wq, &conn->c_send_w, 0); | 243 | if ((atomic_read(&sk->sk_wmem_alloc) << 1) <= sk->sk_sndbuf) |
| 244 | queue_delayed_work(rds_wq, &conn->c_send_w, 0); | ||
| 245 | |||
| 244 | out: | 246 | out: |
| 245 | read_unlock(&sk->sk_callback_lock); | 247 | read_unlock_bh(&sk->sk_callback_lock); |
| 246 | 248 | ||
| 247 | /* | 249 | /* |
| 248 | * write_space is only called when data leaves tcp's send queue if | 250 | * write_space is only called when data leaves tcp's send queue if |
