aboutsummaryrefslogtreecommitdiffstats
path: root/net/rds/ib_send.c
diff options
context:
space:
mode:
authorAndy Grover <andy.grover@oracle.com>2010-03-11 08:49:55 -0500
committerDavid S. Miller <davem@davemloft.net>2010-03-17 00:16:53 -0400
commit735f61e62611161588123930823af6e6a9fd5c2c (patch)
treed07e16026909daa692ddab9c7b0801cc418cb3bc /net/rds/ib_send.c
parent87faf3ccf1c939938600ab57c6c9ed5bd2e5f4cc (diff)
RDS: Do not BUG() on error returned from ib_post_send
BUGging on a runtime error code should be avoided. This patch also eliminates all other BUG()s that have no real reason to exist. Signed-off-by: Andy Grover <andy.grover@oracle.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/rds/ib_send.c')
-rw-r--r--net/rds/ib_send.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/net/rds/ib_send.c b/net/rds/ib_send.c
index a10fab6886d1..f380c3f01256 100644
--- a/net/rds/ib_send.c
+++ b/net/rds/ib_send.c
@@ -574,8 +574,7 @@ int rds_ib_xmit(struct rds_connection *conn, struct rds_message *rm,
574 rds_ib_send_grab_credits(ic, 0, &posted, 1, RDS_MAX_ADV_CREDIT - adv_credits); 574 rds_ib_send_grab_credits(ic, 0, &posted, 1, RDS_MAX_ADV_CREDIT - adv_credits);
575 adv_credits += posted; 575 adv_credits += posted;
576 BUG_ON(adv_credits > 255); 576 BUG_ON(adv_credits > 255);
577 } else if (ic->i_rm != rm) 577 }
578 BUG();
579 578
580 send = &ic->i_sends[pos]; 579 send = &ic->i_sends[pos];
581 first = send; 580 first = send;
@@ -714,8 +713,8 @@ add_header:
714 ic->i_rm = prev->s_rm; 713 ic->i_rm = prev->s_rm;
715 prev->s_rm = NULL; 714 prev->s_rm = NULL;
716 } 715 }
717 /* Finesse this later */ 716
718 BUG(); 717 rds_ib_conn_error(ic->conn, "ib_post_send failed\n");
719 goto out; 718 goto out;
720 } 719 }
721 720