diff options
Diffstat (limited to 'net/rds/cong.c')
| -rw-r--r-- | net/rds/cong.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/net/rds/cong.c b/net/rds/cong.c index 0871a29f0780..75ea686f27d5 100644 --- a/net/rds/cong.c +++ b/net/rds/cong.c | |||
| @@ -141,7 +141,7 @@ static struct rds_cong_map *rds_cong_from_addr(__be32 addr) | |||
| 141 | unsigned long flags; | 141 | unsigned long flags; |
| 142 | 142 | ||
| 143 | map = kzalloc(sizeof(struct rds_cong_map), GFP_KERNEL); | 143 | map = kzalloc(sizeof(struct rds_cong_map), GFP_KERNEL); |
| 144 | if (map == NULL) | 144 | if (!map) |
| 145 | return NULL; | 145 | return NULL; |
| 146 | 146 | ||
| 147 | map->m_addr = addr; | 147 | map->m_addr = addr; |
| @@ -159,7 +159,7 @@ static struct rds_cong_map *rds_cong_from_addr(__be32 addr) | |||
| 159 | ret = rds_cong_tree_walk(addr, map); | 159 | ret = rds_cong_tree_walk(addr, map); |
| 160 | spin_unlock_irqrestore(&rds_cong_lock, flags); | 160 | spin_unlock_irqrestore(&rds_cong_lock, flags); |
| 161 | 161 | ||
| 162 | if (ret == NULL) { | 162 | if (!ret) { |
| 163 | ret = map; | 163 | ret = map; |
| 164 | map = NULL; | 164 | map = NULL; |
| 165 | } | 165 | } |
| @@ -205,7 +205,7 @@ int rds_cong_get_maps(struct rds_connection *conn) | |||
| 205 | conn->c_lcong = rds_cong_from_addr(conn->c_laddr); | 205 | conn->c_lcong = rds_cong_from_addr(conn->c_laddr); |
| 206 | conn->c_fcong = rds_cong_from_addr(conn->c_faddr); | 206 | conn->c_fcong = rds_cong_from_addr(conn->c_faddr); |
| 207 | 207 | ||
| 208 | if (conn->c_lcong == NULL || conn->c_fcong == NULL) | 208 | if (!(conn->c_lcong && conn->c_fcong)) |
| 209 | return -ENOMEM; | 209 | return -ENOMEM; |
| 210 | 210 | ||
| 211 | return 0; | 211 | return 0; |
| @@ -221,7 +221,7 @@ void rds_cong_queue_updates(struct rds_cong_map *map) | |||
| 221 | list_for_each_entry(conn, &map->m_conn_list, c_map_item) { | 221 | list_for_each_entry(conn, &map->m_conn_list, c_map_item) { |
| 222 | if (!test_and_set_bit(0, &conn->c_map_queued)) { | 222 | if (!test_and_set_bit(0, &conn->c_map_queued)) { |
| 223 | rds_stats_inc(s_cong_update_queued); | 223 | rds_stats_inc(s_cong_update_queued); |
| 224 | queue_delayed_work(rds_wq, &conn->c_send_w, 0); | 224 | rds_send_xmit(conn); |
| 225 | } | 225 | } |
| 226 | } | 226 | } |
| 227 | 227 | ||
