RDS: check for congestion updates during rds_send_xmit

Ensure we don't keep sending the data if the link is congested.

Reviewed-by: Ajaykumar Hotchandani <ajaykumar.hotchandani@oracle.com>
Signed-off-by: Santosh Shilimkar <ssantosh@kernel.org>
Signed-off-by: Santosh Shilimkar <santosh.shilimkar@oracle.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
santosh.shilimkar@oracle.com 2015-08-22 15:45:27 -07:00 committed by David S. Miller
parent 73ce4317bf
commit 0c48424021
1 changed files with 2 additions and 1 deletions

View File

@ -411,7 +411,8 @@ over_batch:
*/
if (ret == 0) {
smp_mb();
if (!list_empty(&conn->c_send_queue) &&
if ((test_bit(0, &conn->c_map_queued) ||
!list_empty(&conn->c_send_queue)) &&
send_gen == conn->c_send_gen) {
rds_stats_inc(s_send_lock_queue_raced);
goto restart;